1 | <?php |
||
11 | trait MessageDecorator |
||
12 | { |
||
13 | /** |
||
14 | * @var MessageInterface |
||
15 | */ |
||
16 | private $message; |
||
17 | |||
18 | /** |
||
19 | * Returns the decorated message. |
||
20 | * |
||
21 | * Since the underlying Message is immutable as well |
||
22 | * exposing it is not an issue, because it's state cannot be altered |
||
23 | * |
||
24 | * @return MessageInterface |
||
25 | */ |
||
26 | 14 | public function getMessage() |
|
30 | |||
31 | /** |
||
32 | * {@inheritdoc} |
||
33 | */ |
||
34 | 1 | public function getProtocolVersion() |
|
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | 1 | public function withProtocolVersion($version) |
|
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | 1 | public function getHeaders() |
|
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | 1 | public function hasHeader($header) |
|
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | 1 | public function getHeader($header) |
|
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | 1 | public function getHeaderLine($header) |
|
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | 1 | public function withHeader($header, $value) |
|
92 | |||
93 | /** |
||
94 | * {@inheritdoc} |
||
95 | */ |
||
96 | 1 | public function withAddedHeader($header, $value) |
|
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | 1 | public function withoutHeader($header) |
|
114 | |||
115 | /** |
||
116 | * {@inheritdoc} |
||
117 | */ |
||
118 | 1 | public function getBody() |
|
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | 1 | public function withBody(StreamInterface $body) |
|
133 | } |
||
134 |