0fd85c285d0c8e520fd444298c4787d843e167a8
[yaffs-website] / Tests / Fixtures / Response.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Bridge\PsrHttpMessage\Tests\Fixtures;
13
14 use Psr\Http\Message\ResponseInterface;
15 use Psr\Http\Message\StreamInterface;
16
17 /**
18  * @author Kévin Dunglas <dunglas@gmail.com>
19  */
20 class Response extends Message implements ResponseInterface
21 {
22     private $statusCode;
23
24     public function __construct($version = '1.1', array $headers = array(), StreamInterface $body = null, $statusCode = 200)
25     {
26         parent::__construct($version, $headers, $body);
27
28         $this->statusCode = $statusCode;
29     }
30
31     public function getStatusCode()
32     {
33         return $this->statusCode;
34     }
35
36     public function withStatus($code, $reasonPhrase = '')
37     {
38         throw new \BadMethodCallException('Not implemented.');
39     }
40
41     public function getReasonPhrase()
42     {
43         throw new \BadMethodCallException('Not implemented.');
44     }
45 }