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 | public function __construct(MessageInterface $wrapped) |
||
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | public function getProtocolVersion() |
||
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | public function withProtocolVersion($version) |
||
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | public function getHeaders() |
||
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | */ |
||
51 | public function hasHeader($name) |
||
55 | |||
56 | /** |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function getHeader($name) |
||
63 | |||
64 | /** |
||
65 | * {@inheritdoc} |
||
66 | */ |
||
67 | public function getHeaderLine($name) |
||
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function withHeader($name, $value) |
||
79 | |||
80 | /** |
||
81 | * {@inheritdoc} |
||
82 | */ |
||
83 | public function withAddedHeader($name, $value) |
||
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | public function withoutHeader($name) |
||
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | public function getBody() |
||
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | public function withBody(StreamInterface $body) |
||
111 | |||
112 | /** |
||
113 | * @return mixed |
||
114 | */ |
||
115 | abstract protected function getWrapped(); |
||
116 | } |
||
117 |