static array array_extend(
array
$a, array
$b
)
|
|
"Extend" recursively array $a with array $b values (no deletion in $a, just added and updated values)
Parameters:
API Tags:
static array decode(
string
$json
)
|
|
Decodes json string to PHP array. The function is used
when the encoding is diffrent from utf-8
Parameters:
string |
$json: |
string to decode |
API Tags:
static string encode(
mixed
$value
)
|
|
Encodes a PHP variable into javascript representation.
Example:
$options=array('key1'=>true,'key2'=>123,'key3'=>'value');
echo jqGridUtils::encode($options);
// The following javascript code would be generated:
// {'key1':true,'key2':123,'key3':'value'}
For highly complex data structures use jsonEncode and jsonDecode to serialize and unserialize.
Parameters:
mixed |
$value: |
PHP variable to be encoded |
API Tags:
Return: | the encoded string |
Access: | public |
static mixed GetParam(
string
$parameter_name, [string
$default_value = ""]
)
|
|
Return the value from POST or from GET
Parameters:
string |
$parameter_name: |
|
string |
$default_value: |
|
API Tags:
static mixed parseDate(
string
$format, string
$date, [string
$newformat = '']
)
|
|
Parses a $format and $date value and return the date formated via $newformat.
If the $newformat is not set return the timestamp. Support only numeric date format as input, but the $new format can be any valid PHP date format
Parameters:
string |
$format: |
the format of the date to be parsed |
string |
$date: |
the value of the data. |
string |
$newformat: |
the new format of the $date |
API Tags:
static void phpTojsDate(
string
$phpdate
)
|
|
Convert the php date string to Java Script date string
Parameters:
API Tags:
static string quote(
string
$js, [boolean
$forUrl = false]
)
|
|
Quotes a javascript string.
After processing, the string can be safely enclosed within a pair of quotation marks and serve as a javascript string.
Parameters:
string |
$js: |
string to be quoted |
boolean |
$forUrl: |
whether this string is used as a URL |
API Tags:
Return: | the quoted string |
Access: | public |
static mixed Strip(
mixed
$value
)
|
|
Strip slashes from a varaible if PHP magic quotes are on
Parameters:
mixed |
$value: |
to be striped |
API Tags:
static string toXml(
array
$data, [string
$rootNodeName = 'root'], [SimpleXMLElement
$xml = null], [
$encoding = 'utf-8'], [
$cdata = false]
)
|
|
Function for converting to an XML document.
Pass in a multi dimensional array or object and this recrusively loops through and builds up an XML document.
Parameters:
array |
$data: |
|
string |
$rootNodeName: |
- what you want the root node to be - defaultsto data. |
SimpleXMLElement |
$xml: |
- should only be used recursively |
|
$encoding: |
|
|
$cdata: |
|
API Tags:
Return: | XML |
Access: | public |