Implement interface ArrayAccess in the Value class
[plcapi.git] / src / Request.php
index df899e3..5220968 100644 (file)
@@ -330,8 +330,10 @@ class Request
             if ($xmlRpcParser->_xh['isf']) {
                 /// @todo we should test here if server sent an int and a string, and/or coerce them into such...
                 if ($returnType == 'xmlrpcvals') {
-                    $errNo_v = $v->structmem('faultCode');
-                    $errStr_v = $v->structmem('faultString');
+                    //$errNo_v = $v->structmem('faultCode');
+                    //$errStr_v = $v->structmem('faultString');
+                    $errNo_v = $v['faultCode'];
+                    $errStr_v = $v['faultString'];
                     $errNo = $errNo_v->scalarval();
                     $errStr = $errStr_v->scalarval();
                 } else {
@@ -357,6 +359,16 @@ class Request
         return $r;
     }
 
+    /**
+     * Kept the old name even if Request class was renamed, for compatibility.
+     *
+     * @return string
+     */
+    public function kindOf()
+    {
+        return 'msg';
+    }
+
     /**
      * Enables/disables the echoing to screen of the xmlrpc responses received.
      *