Fully Qualified Name: | Zend\Json\Encoder |
Encode PHP constructs to JSON.
Name | Description | Defined By |
---|---|---|
encode() | Use the JSON encoding scheme for the value specified. | Encoder |
encodeClass() | Encodes the given $className into the class2 model of encoding PHP classes into JavaScript class2 classes. | Encoder |
encodeClasses() | Encode several classes at once. | Encoder |
encodeUnicodeString() | Encode Unicode Characters to \u0000 ASCII syntax. | Encoder |
Use the JSON encoding scheme for the value specified.
Parameter Name | Type | Description |
---|---|---|
$value | mixed | The |
$cycleCheck | bool | Whether |
$options | array | Additional |
Returns: string The encoded value.
Encodes the given $className into the class2 model of encoding PHP classes into JavaScript class2 classes.
NOTE: Currently only public methods and variables are proxied onto the client machine
Parameter Name | Type | Description |
---|---|---|
string | $package | Optional |
$className | ||
$package |
Returns: string The class2 (JavaScript) encoding of the class.
Encode several classes at once.
Returns JSON encoded classes, using {@link encodeClass()}.
Parameter Name | Type | Description |
---|---|---|
$classNames | string[] | |
$package | string |
Returns: string
Encode Unicode Characters to \u0000 ASCII syntax.
This algorithm was originally developed for the Solar Framework by Paul M. Jones.
Parameter Name | Type | Description |
---|---|---|
$value | string |
Returns: string