1 | <?php |
||
8 | abstract class Message implements MessageInterface |
||
9 | { |
||
10 | /** |
||
11 | * @var MessageInterface |
||
12 | */ |
||
13 | protected $wrapped; |
||
14 | |||
15 | /** |
||
16 | * Message constructor. |
||
17 | * @param MessageInterface $wrapped |
||
18 | */ |
||
19 | 105 | public function __construct(MessageInterface $wrapped) |
|
20 | { |
||
21 | 105 | $this->wrapped = $wrapped; |
|
22 | 105 | } |
|
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 1 | public function getProtocolVersion() |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 1 | public function withProtocolVersion($version) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 1 | public function getHeaders() |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | 2 | public function hasHeader($name) |
|
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | 1 | public function getHeader($name) |
|
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | 1 | public function getHeaderLine($name) |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | 1 | public function withHeader($name, $value) |
|
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | 1 | public function withAddedHeader($name, $value) |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 1 | public function withoutHeader($name) |
|
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | 1 | public function getBody() |
|
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | 1 | public function withBody(StreamInterface $body) |
|
111 | |||
112 | /** |
||
113 | * @return mixed |
||
114 | */ |
||
115 | abstract protected function getWrapped(); |
||
116 | } |
||
117 |