Beispiel #1
0
 /**
  * Extend current response with another.
  *
  * @param IHttpResponse $response
  */
 public function extend(IHttpResponse $response)
 {
     $this->setHeaders(clone $response->getHeaders());
     $this->setProtocol($response->getProtocol());
     $this->setProtocolVersion($response->getProtocolVersion());
     $this->setStatusCode($response->getStatusCode());
     $this->setContent($response->getContent());
     $this->setCookies(clone $response->getCookies());
     $this->setDefaultContentType();
 }
Beispiel #2
0
 /**
  * @param IHttpResponse $response
  */
 public function sendContent(IHttpResponse $response)
 {
     echo $response->getContent();
 }