Zend Framework
2.4
|
Class for Zend encode method. More...
Public Member Functions | |
__construct ($expression) | |
Constructor. | |
__toString () | |
Cast to string. | |
Protected Attributes | |
$expression | |
Class for Zend encode method.
This class simply holds a string with a native Javascript Expression, so objects | arrays to be encoded with Zend can contain native Javascript Expressions.
Example: $foo = array( 'integer' => 9, 'string' => 'test string', 'function' => Zend( 'function () { window.alert("javascript function encoded by Zend\Json\Json") }' ), );
Zend::encode($foo, false, array('enableJsonExprFinder' => true)); // it will returns json encoded string: // {"integer":9,"string":"test string","function":function () {window.alert("javascript function encoded by Zend\Json\Json")}}
__construct | ( | $expression | ) |
Constructor.
string | $expression | the expression to hold. |
__toString | ( | ) |
Cast to string.
|
protected |