/** * 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; }
/** * @return \Zend\Http\Response */ public function getResponse() { return parent::getResponse(); }
/** * Возвращает ответ * * @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; }