@@ -115,7 +115,7 @@ function __construct($settings = array()) {
115
115
* @param string $method Method to be called
116
116
* @param array $params Parameters for the method being called.
117
117
* @access public
118
- * @return mixed
118
+ * @return mixed Depends on the return of the dispatched method, or it could be an instance of the EngineHelper
119
119
**/
120
120
function call__ ($ method , $ params ) {
121
121
if (isset ($ this ->{$ this ->__engineName }) && method_exists ($ this ->{$ this ->__engineName }, $ method )) {
@@ -150,6 +150,20 @@ function call__($method, $params) {
150
150
trigger_error (sprintf (__ ('JsHelper:: Missing Method %s is undefined ' , true ), $ method ), E_USER_WARNING );
151
151
}
152
152
153
+ /**
154
+ * Workaround for Object::Object() existing. Since Object::object exists, it does not
155
+ * fall into call__ and is not passed onto the engine helper. See JsBaseEngineHelper::object() for
156
+ * more information on this method.
157
+ *
158
+ * @param mixed $data Data to convert into JSON
159
+ * @param array $options Options to use for encoding JSON. See JsBaseEngineHelper::object() for more details.
160
+ * @return string encoded JSON
161
+ * @deprecated Remove when support for PHP4 and Object::object are removed.
162
+ **/
163
+ function object ($ data = array (), $ options = array ()) {
164
+ return $ this ->{$ this ->__engineName }->object ($ data , $ options );
165
+ }
166
+
153
167
/**
154
168
* Writes all Javascript generated so far to a code block or
155
169
* caches them to a file and returns a linked script.
0 commit comments