Zend Framework  1.12
Public Member Functions | List of all members
Zend_View_Helper_Json Class Reference

Public Member Functions

 json ($data, $keepLayouts=false, $encodeData=true)
 Encode data as JSON, disable layouts, and set response header.
 
- Public Member Functions inherited from Zend_View_Helper_Abstract
 setView (Zend_View_Interface $view)
 Set the View object.
 
 direct ()
 Strategy pattern: currently unutilized.
 

Additional Inherited Members

- Public Attributes inherited from Zend_View_Helper_Abstract
 $view = null
 

Member Function Documentation

json (   $data,
  $keepLayouts = false,
  $encodeData = true 
)

Encode data as JSON, disable layouts, and set response header.

If $keepLayouts is true, does not disable layouts. If $encodeJson is false, does not JSON-encode $data

Parameters
mixed$data
bool$keepLayoutsNOTE: if boolean, establish $keepLayouts to true|false if array, admit params for Zend_Json::encode as enableJsonExprFinder=>true|false this 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 used here
bool$encodeData
Returns
string|void