diff options
| author | ctrlaltca@gmail.com <> | 2012-03-25 20:12:18 +0000 | 
|---|---|---|
| committer | ctrlaltca@gmail.com <> | 2012-03-25 20:12:18 +0000 | 
| commit | 05f4b961ca2e8952566867936d5e1aec6111e5b6 (patch) | |
| tree | 5de338fa1db690b7b59e502a7148b78561bd2d18 /framework/Web/Javascripts/TJavaScript.php | |
| parent | afa72375ca68d10e6b626f45fb713feb69696f21 (diff) | |
added $assoc and $depth parameters to TJavascript::jsonDecode()
Diffstat (limited to 'framework/Web/Javascripts/TJavaScript.php')
| -rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php index 9a152a32..468182d2 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -228,11 +228,13 @@ class TJavaScript  	 * Decodes a javascript string into PHP variable.
  	 * This method invokes json_decode to perform the decoding.
  	 * @param string string to be decoded
 +	 * @param bool whether to convert returned objects to associative arrays
 +	 * @param int recursion depth
  	 * @return mixed decoded variable
  	 */
 -	public static function jsonDecode($value)
 +	public static function jsonDecode($value, $assoc = false, $depth = 512)
  	{
 -		$s= json_decode($value);
 +		$s= json_decode($value, $assoc, $depth);
  		self::checkJsonError();
  		return $s;
  	}
  | 
