1 | <?php |
||
9 | abstract class Message implements MessageInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $protocolVersion = '1.1'; |
||
15 | |||
16 | /** |
||
17 | * @var array[string] |
||
18 | */ |
||
19 | private $validProtocolVersions = ['1.0', '1.1']; |
||
20 | |||
21 | /** |
||
22 | * @var array[string] |
||
23 | */ |
||
24 | protected $headers = []; |
||
25 | |||
26 | /** |
||
27 | * @var StreamInterface |
||
28 | */ |
||
29 | protected $body; |
||
30 | |||
31 | /** |
||
32 | * @var array[string] |
||
33 | */ |
||
34 | protected $normalizedHeaderIndex = []; |
||
35 | |||
36 | /** |
||
37 | * @inheritDoc |
||
38 | */ |
||
39 | 3 | public function getProtocolVersion() |
|
43 | |||
44 | /** |
||
45 | * @inheritDoc |
||
46 | */ |
||
47 | 6 | public function withProtocolVersion($protocolVersion) |
|
58 | |||
59 | /** |
||
60 | * @inheritDoc |
||
61 | */ |
||
62 | 9 | public function getHeaders() |
|
66 | |||
67 | /** |
||
68 | * @inheritDoc |
||
69 | */ |
||
70 | 60 | public function hasHeader($name) |
|
78 | |||
79 | /** |
||
80 | * @inheritDoc |
||
81 | */ |
||
82 | 30 | public function getHeader($name) |
|
90 | |||
91 | /** |
||
92 | * @inheritDoc |
||
93 | */ |
||
94 | 6 | public function getHeaderLine($name) |
|
102 | |||
103 | /** |
||
104 | * @inheritDoc |
||
105 | */ |
||
106 | 51 | public function withHeader($name, $value) |
|
119 | |||
120 | /** |
||
121 | * @inheritDoc |
||
122 | */ |
||
123 | 6 | public function withAddedHeader($name, $value) |
|
143 | |||
144 | /** |
||
145 | * @inheritDoc |
||
146 | */ |
||
147 | 3 | public function withoutHeader($name) |
|
160 | |||
161 | /** |
||
162 | * @inheritDoc |
||
163 | */ |
||
164 | 3 | public function getBody() |
|
168 | |||
169 | /** |
||
170 | * @inheritDoc |
||
171 | */ |
||
172 | 3 | public function withBody(StreamInterface $body) |
|
179 | } |
||
180 |