Пример #1
0
 public static function fromHttpResponse(IHttpResponse $response)
 {
     $report = new self();
     $report->content = $response->getContent();
     return $report;
 }
Пример #2
0
 /**
  * @param IHttpResponse $response
  */
 public function shutdownWithResponse(IHttpResponse $response)
 {
     $this->shutdown();
     $response->send();
     exit;
 }
Пример #3
0
 /**
  * @param IHttpResponse $httpResponse
  */
 protected function cleanUpResponse(IHttpResponse $httpResponse)
 {
     // remove this header to be able to return response directly
     // to the browser without causing an error
     $httpResponse->getHeaders()->remove('transfer-encoding');
 }