Exemple #1
0
 /**
  * Handles the given request xml.
  *
  * @param string $request_xml The incoming request.
  *
  * @return string
  */
 public function handle($request_xml)
 {
     $result = $this->parseRequest($request_xml);
     if (!$result || Ripcord::isFault($result)) {
         return $result;
     } else {
         $method = $result['methodName'];
         $params = $result['params'];
     }
     if ($method == 'system.multiCall' || $method == 'system.multicall') {
         // php's xml-rpc server (xmlrpc-epi) crashes on multi call, so handle it ourselves... fixed in php 5.3.2
         $result = $this->multiCall($params);
     } else {
         try {
             $result = xmlrpc_server_call_method($this->xmlrpc, $request_xml, null, $this->outputOptions);
         } catch (\Exception $e) {
             $result = xmlrpc_encode_request(null, Ripcord::fault($e->getCode(), $e->getMessage()), $this->outputOptions);
         }
     }
     return $result;
 }