1 | <?php declare(strict_types=1); |
||
13 | final class HeaderCollectorMiddleware implements MiddlewareInterface |
||
14 | { |
||
15 | use ErrorTrait; |
||
16 | use PreTrait; |
||
17 | |||
18 | /** |
||
19 | * @var Headers |
||
20 | */ |
||
21 | private $headers; |
||
22 | |||
23 | /** |
||
24 | * @param Headers $headers |
||
25 | */ |
||
26 | 1 | public function __construct(Headers $headers) |
|
30 | |||
31 | /** |
||
32 | * @param ResponseInterface $response |
||
33 | * @param array $options |
||
34 | * @return CancellablePromiseInterface |
||
35 | */ |
||
36 | 1 | public function post(ResponseInterface $response, array $options = []): CancellablePromiseInterface |
|
47 | |||
48 | /** |
||
49 | * @return int |
||
50 | */ |
||
51 | public function priority(): int |
||
55 | |||
56 | /** |
||
57 | * @param ResponseInterface $response |
||
58 | * @param array $headers |
||
59 | */ |
||
60 | 1 | private function extractHeaders(ResponseInterface $response, array $headers) |
|
78 | } |
||
79 |