예제 #1
0
 /**
  * Log response information
  *
  * @param Spizer_Response $response
  */
 public function logResponse(Spizer_Response $response)
 {
     $this->_db->insert('responses', array('microtime' => microtime(true), 'request_id' => $this->_currentReqId, 'statuscode' => $response->getStatus(), 'message' => $response->getMessage()));
     $stmt = $this->_db->prepare("INSERT INTO response_headers (request_id, header, value) VALUES ({$this->_currentReqId}, ?, ?)");
     foreach ($response->getAllHeaders() as $k => $v) {
         $stmt->execute(array($k, $v));
     }
 }