コード例 #1
0
 /**
  * Get response header by key
  *
  * @param string $header
  *
  * @return \Zend\Http\Header\HeaderInterface|false
  */
 protected function getResponseHeader($header)
 {
     /** @var Response $response */
     $response = $this->controller->getResponse();
     $headers = $response->getHeaders();
     $responseHeader = $headers->get($header, false);
     return $responseHeader;
 }
コード例 #2
0
 /**
  * @return \Zend\Http\Response
  */
 public function getResponse()
 {
     return parent::getResponse();
 }
コード例 #3
0
 /**
  * Возвращает ответ
  *
  * @return HttpResponse
  * @throws Exception\InvalidArgumentException
  */
 public function getResponse()
 {
     $response = parent::getResponse();
     if (!$response instanceof HttpResponse) {
         $errMsg = 'Response no http';
         throw new Exception\InvalidArgumentException($errMsg);
     }
     return $response;
 }