API Documentation

View/Helper/Json.php

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_View  
subpackage
Helper  
version
$Id: Json.php 23775 2011-03-01 17:25:24Z ralph $  

\Zend_View_Helper_Json

Helper for simplifying JSON responses

Extends from
\Zend_View_Helper_Abstract
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_View  
subpackage
Helper  

Methods

methodpublicdirect( ) : void

Strategy pattern: currently unutilized

Inherited from: \Zend_View_Helper_Abstract::direct()
methodpublicjson( mixed $data, bool $keepLayouts = false ) : string|void

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

If $keepLayouts is true, does not disable layouts.

Parameters
Name Type Description
$data mixed
$keepLayouts bool

NOTE: 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 that will not be passed to Zend_Json::encode method but will be used here

Returns
Type Description
stringvoid
methodpublicsetView( \Zend_View_Interface $view ) : \Zend_View_Helper_Abstract

Set the View object

Inherited from: \Zend_View_Helper_Abstract::setView()
Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_View_Helper_Abstract
Documentation was generated by DocBlox 0.13.3.