3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\Feed\Reader\Http;
12 use Psr\Http\Message\ResponseInterface as Psr7ResponseInterface;
15 * ResponseInterface wrapper for a PSR-7 response.
17 class Psr7ResponseDecorator implements HeaderAwareResponseInterface
20 * @var Psr7ResponseInterface
22 private $decoratedResponse;
25 * @param Psr7ResponseInterface $response
27 public function __construct(Psr7ResponseInterface $response)
29 $this->decoratedResponse = $response;
33 * Return the original PSR-7 response being decorated.
35 * @return Psr7ResponseInterface
37 public function getDecoratedResponse()
39 return $this->decoratedResponse;
45 public function getBody()
47 return (string) $this->decoratedResponse->getBody();
53 public function getStatusCode()
55 return $this->decoratedResponse->getStatusCode();
61 public function getHeaderLine($name, $default = null)
63 if (! $this->decoratedResponse->hasHeader($name)) {
66 return $this->decoratedResponse->getHeaderLine($name);