From 05f4b961ca2e8952566867936d5e1aec6111e5b6 Mon Sep 17 00:00:00 2001 From: "ctrlaltca@gmail.com" <> Date: Sun, 25 Mar 2012 20:12:18 +0000 Subject: added $assoc and $depth parameters to TJavascript::jsonDecode() --- framework/Web/Javascripts/TJavaScript.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'framework/Web/Javascripts') 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; } -- cgit v1.2.3