- /**
- * RPC method proxy
- *
- * @param string $method RPC method name
- * @param array $params RPC method arguments
- * @return mixed decoded RPC response
- * @throws Exception
- */
- public function __call($method, array $params)
- {
- if ($this->namespace) {
- $method = $this->namespace .'.'. $method;
- }
- $this->request->setRawPostData(xmlrpc_encode_request($method, $params));
- $response = $this->request->send();
- if ($response->getResponseCode() != 200) {
- throw new Exception($response->getBody(), $response->getResponseCode());
- }
- return xmlrpc_decode($response->getBody(), 'utf-8');
- }
+ /**
+ * RPC method proxy
+ *
+ * @param string $method RPC method name
+ * @param array $params RPC method arguments
+ * @return mixed decoded RPC response
+ * @throws Exception
+ */
+ public function __call($method, array $params)
+ {
+ if ($this->namespace) {
+ $method = $this->namespace .'.'. $method;
+ }
+ $this->request->setRawPostData(xmlrpc_encode_request($method, $params));
+ $response = $this->request->send();
+ if ($response->getResponseCode() != 200) {
+ throw new Exception($response->getBody(), $response->getResponseCode());
+ }
+ return xmlrpc_decode($response->getBody(), 'utf-8');
+ }