1 | <?php namespace Limoncello\Core\Application; |
||
29 | class Sapi implements SapiInterface |
||
30 | { |
||
31 | /** |
||
32 | * @var EmitterInterface |
||
33 | */ |
||
34 | private $sapiEmitter; |
||
35 | |||
36 | /** |
||
37 | * @var array |
||
38 | */ |
||
39 | private $server; |
||
40 | |||
41 | /** |
||
42 | * @var array |
||
43 | */ |
||
44 | private $files; |
||
45 | |||
46 | /** |
||
47 | * @var array |
||
48 | */ |
||
49 | private $headers; |
||
50 | |||
51 | /** |
||
52 | * @var UriInterface |
||
53 | */ |
||
54 | private $uri; |
||
55 | |||
56 | /** |
||
57 | * @var string |
||
58 | */ |
||
59 | private $method; |
||
60 | |||
61 | /** |
||
62 | * @var array |
||
63 | */ |
||
64 | private $cookies; |
||
65 | |||
66 | /** |
||
67 | * @var array |
||
68 | */ |
||
69 | private $queryParams; |
||
70 | |||
71 | /** |
||
72 | * @var array|object |
||
73 | */ |
||
74 | private $parsedBody; |
||
75 | |||
76 | /** |
||
77 | * @var string|resource|StreamInterface |
||
78 | */ |
||
79 | private $messageBody; |
||
80 | |||
81 | /** |
||
82 | * @var string |
||
83 | */ |
||
84 | private $protocolVersion; |
||
85 | |||
86 | /** |
||
87 | * Sapi constructor. |
||
88 | * |
||
89 | * @param EmitterInterface $sapiEmitter |
||
90 | * @param array|null $server |
||
91 | * @param array|null $queryParams |
||
92 | * @param array|object|null $parsedBody |
||
93 | * @param array|null $cookies |
||
94 | * @param array|null $files |
||
95 | * @param string|resource|StreamInterface $messageBody |
||
96 | * @param string $protocolVersion |
||
97 | * |
||
98 | * @SuppressWarnings(PHPMD.StaticAccess) |
||
99 | * @SuppressWarnings(PHPMD.Superglobals) |
||
100 | */ |
||
101 | 7 | public function __construct( |
|
125 | |||
126 | /** |
||
127 | * @inheritdoc |
||
128 | */ |
||
129 | 5 | public function getServer(): array |
|
133 | |||
134 | /** |
||
135 | * @inheritdoc |
||
136 | */ |
||
137 | 5 | public function getFiles(): array |
|
141 | |||
142 | /** |
||
143 | * @inheritdoc |
||
144 | */ |
||
145 | 5 | public function getHeaders(): array |
|
149 | |||
150 | /** |
||
151 | * @inheritdoc |
||
152 | */ |
||
153 | 7 | public function getUri(): UriInterface |
|
157 | |||
158 | /** |
||
159 | * @inheritdoc |
||
160 | */ |
||
161 | 7 | public function getMethod(): string |
|
165 | |||
166 | /** |
||
167 | * @inheritdoc |
||
168 | */ |
||
169 | 5 | public function getCookies(): array |
|
173 | |||
174 | /** |
||
175 | * @inheritdoc |
||
176 | */ |
||
177 | 5 | public function getQueryParams(): array |
|
181 | |||
182 | /** |
||
183 | * @inheritdoc |
||
184 | */ |
||
185 | 5 | public function getParsedBody() |
|
189 | |||
190 | /** |
||
191 | * @inheritdoc |
||
192 | */ |
||
193 | 5 | public function getRequestBody() |
|
197 | |||
198 | /** |
||
199 | * @inheritdoc |
||
200 | */ |
||
201 | 5 | public function getProtocolVersion(): string |
|
205 | |||
206 | /** |
||
207 | * @inheritdoc |
||
208 | */ |
||
209 | 1 | public function handleResponse(ResponseInterface $response): void |
|
213 | } |
||
214 |