Beispiel #1
0
 private function checkResponse($json_array)
 {
     $response = new Response();
     if (!($res = $response->create($json_array))) {
         $this->setError($response->fault);
     }
     return $res;
 }
Beispiel #2
0
 private function addResponse($request, $result)
 {
     $ar = array('id' => $request->id);
     if ($this->error) {
         $ar['error'] = $this->error;
     } else {
         $ar['result'] = $result;
     }
     $response = new Response();
     if (!$response->create($ar)) {
         $this->logError($response->fault);
         $response->createStdError(Rpc::ERR_INTERNAL, $request->id);
     }
     $this->responses[] = $response->toJson();
 }