Exemplo n.º 1
0
 /**
  * @param Api\Response $response
  */
 public function success(Api\Response $response)
 {
     if (!isset($this->calls[$oid = spl_object_hash($response->getRequest())])) {
         return;
     }
     $debugInfo = $response->debugInfo;
     $current = $this->calls[$oid];
     $this->totalTime += $current->time = $debugInfo['total_time'];
     unset($debugInfo['total_time']);
     $current->info = $debugInfo;
     $current->info['method'] = $response->getRequest()->getMethod();
     $current->result = $response->toArray() ?: $response->getContent();
 }