Beispiel #1
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();
 }