1 | <?php namespace Neomerx\JsonApi\Http; |
||
28 | class Request implements ServerRequestInterface |
||
29 | { |
||
30 | /** |
||
31 | * @var Closure |
||
32 | */ |
||
33 | private $getHeaderClosure; |
||
34 | |||
35 | /** |
||
36 | * @var Closure |
||
37 | */ |
||
38 | private $getQueryParamsClosure; |
||
39 | |||
40 | /** |
||
41 | * @param Closure $getHeaderClosure |
||
42 | * @param Closure $getQueryParamsClosure |
||
43 | */ |
||
44 | 18 | public function __construct(Closure $getHeaderClosure, Closure $getQueryParamsClosure) |
|
49 | |||
50 | /** |
||
51 | * @inheritdoc |
||
52 | */ |
||
53 | 17 | public function getHeader($name) |
|
60 | |||
61 | /** |
||
62 | * @inheritdoc |
||
63 | */ |
||
64 | 15 | public function getQueryParams() |
|
71 | |||
72 | /** |
||
73 | * @inheritdoc |
||
74 | */ |
||
75 | 1 | public function getProtocolVersion() |
|
80 | |||
81 | /** |
||
82 | * @inheritdoc |
||
83 | */ |
||
84 | 1 | public function withProtocolVersion($version) |
|
89 | |||
90 | /** |
||
91 | * @inheritdoc |
||
92 | */ |
||
93 | 1 | public function getHeaders() |
|
98 | |||
99 | /** |
||
100 | * @inheritdoc |
||
101 | */ |
||
102 | 1 | public function hasHeader($name) |
|
107 | |||
108 | /** |
||
109 | * @inheritdoc |
||
110 | */ |
||
111 | 1 | public function getHeaderLine($name) |
|
116 | |||
117 | /** |
||
118 | * @inheritdoc |
||
119 | */ |
||
120 | 1 | public function withHeader($name, $value) |
|
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | */ |
||
129 | 1 | public function withAddedHeader($name, $value) |
|
134 | |||
135 | /** |
||
136 | * @inheritdoc |
||
137 | */ |
||
138 | 1 | public function withoutHeader($name) |
|
143 | |||
144 | /** |
||
145 | * @inheritdoc |
||
146 | */ |
||
147 | 1 | public function getBody() |
|
152 | |||
153 | /** |
||
154 | * @inheritdoc |
||
155 | */ |
||
156 | 1 | public function withBody(StreamInterface $body) |
|
161 | |||
162 | /** |
||
163 | * @inheritdoc |
||
164 | */ |
||
165 | 1 | public function getRequestTarget() |
|
170 | |||
171 | /** |
||
172 | * @inheritdoc |
||
173 | */ |
||
174 | 1 | public function withRequestTarget($requestTarget) |
|
179 | |||
180 | /** |
||
181 | * @inheritdoc |
||
182 | */ |
||
183 | 1 | public function getMethod() |
|
188 | |||
189 | /** |
||
190 | * @inheritdoc |
||
191 | */ |
||
192 | 1 | public function withMethod($method) |
|
197 | |||
198 | /** |
||
199 | * @inheritdoc |
||
200 | */ |
||
201 | 1 | public function getUri() |
|
206 | |||
207 | /** |
||
208 | * @inheritdoc |
||
209 | */ |
||
210 | 1 | public function withUri(UriInterface $uri, $preserveHost = false) |
|
215 | |||
216 | /** |
||
217 | * @inheritdoc |
||
218 | */ |
||
219 | 1 | public function getServerParams() |
|
224 | |||
225 | /** |
||
226 | * @inheritdoc |
||
227 | */ |
||
228 | 1 | public function getCookieParams() |
|
233 | |||
234 | /** |
||
235 | * @inheritdoc |
||
236 | */ |
||
237 | 1 | public function withCookieParams(array $cookies) |
|
242 | |||
243 | /** |
||
244 | * @inheritdoc |
||
245 | */ |
||
246 | 1 | public function withQueryParams(array $query) |
|
251 | |||
252 | /** |
||
253 | * @inheritdoc |
||
254 | */ |
||
255 | 1 | public function getUploadedFiles() |
|
260 | |||
261 | /** |
||
262 | * @inheritdoc |
||
263 | */ |
||
264 | 1 | public function withUploadedFiles(array $uploadedFiles) |
|
269 | |||
270 | /** |
||
271 | * @inheritdoc |
||
272 | */ |
||
273 | 1 | public function getParsedBody() |
|
278 | |||
279 | /** |
||
280 | * @inheritdoc |
||
281 | */ |
||
282 | 1 | public function withParsedBody($data) |
|
287 | |||
288 | /** |
||
289 | * @inheritdoc |
||
290 | */ |
||
291 | 1 | public function getAttributes() |
|
296 | |||
297 | /** |
||
298 | * @inheritdoc |
||
299 | */ |
||
300 | 1 | public function getAttribute($name, $default = null) |
|
305 | |||
306 | /** |
||
307 | * @inheritdoc |
||
308 | */ |
||
309 | 1 | public function withAttribute($name, $value) |
|
314 | |||
315 | /** |
||
316 | * @inheritdoc |
||
317 | */ |
||
318 | 1 | public function withoutAttribute($name) |
|
323 | } |
||
324 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.