Client

# Class: Json Source Location: /client/AjaxHelper.php
### Class Overview
PHP to JSON type converter (incomplete) #### Author(s): | ### Methods arrayFromPhp escapeQuotes fromPhpArray fromPhpArrayToJsonArray fromPhpArrayToJsonObject fromPhpObject fromPhpObjectToJsonArray fromPhpObjectToJsonObject is_vector objectFromPhp serialize
### Class Details [line 255] PHP to JSON type converter (incomplete) #### Tags:
todo: | Json::objectFromPhp()
todo: | Json::toPhpArray()
todo: | Json::toPhpObject()
[ Top ] ### Class Methods ### method arrayFromPhp [line 285]
`void arrayFromPhp( mixed $phpVariable, [bool $doEscape = true])`
Serializes a PHP variable to a JSON array #### Tags:
static: |
access: | public
#### Parameters:
mixed | $phpVariable | PHP variable
bool | $doEscape | Escape quotes
[ Top ] ### method escapeQuotes [line 560]
`void escapeQuotes( mixed $stringToEncode, bool 1)`
Escapes single quotes (using a backslash) #### Tags:
static: |
access: | private
#### Parameters:
bool | 1 | Escape quotes
mixed | $stringToEncode | PHP variable
[ Top ] ### method fromPhpArray [line 474]
`void fromPhpArray( array $phpArray, [bool $doEscape = true])`
Serializes a PHP array to a JSON array (respects object/array types during recursion) (warning: keys will be lost) #### Tags:
static: |
access: | private
#### Parameters:
array | $phpArray | PHP array to be serialized in JSON array
bool | $doEscape | Escape quotes
[ Top ] ### method fromPhpArrayToJsonArray [line 330]
`void fromPhpArrayToJsonArray( array $phpArray, [bool $doEscape = true])`
Serializes a PHP array to a JSON array (warning: keys will be lost) #### Tags:
static: |
access: | private
#### Parameters:
array | $phpArray | PHP array to be serialized in JSON array
bool | $doEscape | Escape quotes
[ Top ] ### method fromPhpArrayToJsonObject [line 400]
`void fromPhpArrayToJsonObject( array $phpArray, [bool $doEscape = true])`
Serializes a PHP array to a JSON array #### Tags:
static: |
access: | private
#### Parameters:
array | $phpArray | PHP array to be serialized in JSON array
bool | $doEscape | Escape quotes
[ Top ] ### method fromPhpObject [line 522]
`void fromPhpObject( mixed $phpObject, [bool $doEscape = true])`
Serializes a PHP object to a JSON object (respects object/array types during recursion) #### Tags:
static: |
access: | private
#### Parameters:
mixed | $phpObject | PHP object
bool | $doEscape | Escape quotes
[ Top ] ### method fromPhpObjectToJsonArray [line 364]
`void fromPhpObjectToJsonArray( mixed $phpObject, [bool $doEscape = true])`
Serializes a PHP object to a JSON array #### Tags:
static: |
access: | private
#### Parameters:
mixed | $phpObject | PHP object
bool | $doEscape | Escape quotes
[ Top ] ### method fromPhpObjectToJsonObject [line 436]
`void fromPhpObjectToJsonObject( mixed $phpObject, [bool $doEscape = true])`
Serializes a PHP object to a JSON object #### Tags:
static: |
access: | private
#### Parameters:
mixed | $phpObject | PHP object
bool | $doEscape | Escape quotes
[ Top ] ### method is_vector [line 510]
`bool is_vector( array &$array)`
Tells if an array indexes are all numeric (not necessarily sequenctial) #### Tags:
return: | True is the given array is a vector
access: | protected
#### Parameters:
array | &$array |
[ Top ] ### method objectFromPhp [line 308]
`void objectFromPhp( mixed $phpVariable, [bool $doEscape = true])`
Serializes a PHP variable to a JSON object (warning: properties name will be lost) #### Tags:
static: |
access: | public
#### Parameters:
mixed | $phpVariable | PHP variable
bool | $doEscape | Escape quotes
[ Top ] ### method serialize [line 264]
`void serialize( array $phpVariable, [bool $doEscape = true])`
Serializes a PHP variable to a Javascript variable representation (respects object/array types during recursion) (warning: keys will be lost) #### Tags:
static: |
access: | public
#### Parameters:
array | $phpVariable | PHP array to be serialized in JSON array
bool | $doEscape | Escape quotes
[ Top ] Documentation generated on Fri, 21 Sep 2007 13:30:28 +0200 by phpDocumentor 1.3.0RC3