Zend Framework
1.12
|
Public Member Functions | |
encodeJson ($data, $keepLayouts=false, $encodeData=true) | |
Create JSON response. | |
sendJson ($data, $keepLayouts=false, $encodeData=true) | |
Encode JSON response and immediately send. | |
direct ($data, $sendNow=true, $keepLayouts=false, $encodeData=true) | |
Strategy pattern: call helper as helper broker method. | |
![]() | |
setActionController (Zend_Controller_Action $actionController=null) | |
setActionController() | |
getActionController () | |
Retrieve current action controller. | |
getFrontController () | |
Retrieve front controller instance. | |
init () | |
Hook into action controller initialization. | |
preDispatch () | |
Hook into action controller preDispatch() workflow. | |
postDispatch () | |
Hook into action controller postDispatch() workflow. | |
getRequest () | |
getRequest() - | |
getResponse () | |
getResponse() - | |
getName () | |
getName() | |
Public Attributes | |
$suppressExit = false | |
Additional Inherited Members | |
![]() | |
$_actionController = null | |
$_actionController | |
$_frontController = null | |
direct | ( | $data, | |
$sendNow = true , |
|||
$keepLayouts = false , |
|||
$encodeData = true |
|||
) |
Strategy pattern: call helper as helper broker method.
Allows encoding JSON. If $sendNow is true, immediately sends JSON response.
mixed | $data | |
boolean | $sendNow | |
boolean | $keepLayouts | |
boolean | $encodeData | Encode $data as JSON? |
encodeJson | ( | $data, | |
$keepLayouts = false , |
|||
$encodeData = true |
|||
) |
Create JSON response.
Encodes and returns data to JSON. Content-Type header set to 'application/json', and disables layouts and viewRenderer (if being used).
mixed | $data | |
boolean | $keepLayouts | |
boolean | array | $keepLayouts | |
boolean | $encodeData | Provided data is already JSON NOTE: if boolean, establish $keepLayouts to true|false if array, admit params for Zend_Json::encode as enableJsonExprFinder=>true|false if $keepLayouts and parmas for Zend_Json::encode are required then, the array can contains a 'keepLayout'=>true|false and/or 'encodeData'=>true|false that will not be passed to Zend_Json::encode method but will be passed to Zend_View_Helper_Json |
Zend_Controller_Action_Helper_Json |
sendJson | ( | $data, | |
$keepLayouts = false , |
|||
$encodeData = true |
|||
) |
Encode JSON response and immediately send.
mixed | $data | |
boolean | array | $keepLayouts | |
$encodeData | Encode $data as JSON? NOTE: if boolean, establish $keepLayouts to true|false if array, admit params for Zend_Json::encode as enableJsonExprFinder=>true|false if $keepLayouts and parmas for Zend_Json::encode are required then, the array can contains a 'keepLayout'=>true|false and/or 'encodeData'=>true|false that will not be passed to Zend_Json::encode method but will be passed to Zend_View_Helper_Json |
$suppressExit = false |