| 1 | <?php |
||
| 9 | final class HeadersNegotiator implements HeadersNegotiatorInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var string[] |
||
| 13 | */ |
||
| 14 | private $allowHeaders; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @param string[] $allowHeaders |
||
| 18 | */ |
||
| 19 | 6 | public function __construct(array $allowHeaders) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * @param string $allowHeader |
||
| 29 | */ |
||
| 30 | 6 | private function addAllowHeader(string $allowHeader): void |
|
| 34 | |||
| 35 | /** |
||
| 36 | * @param ServerRequestInterface $request |
||
| 37 | * |
||
| 38 | * @return bool |
||
| 39 | */ |
||
| 40 | 5 | public function negotiate(ServerRequestInterface $request): bool |
|
| 59 | |||
| 60 | /** |
||
| 61 | * @param ServerRequestInterface $request |
||
| 62 | * @return string[] |
||
| 63 | */ |
||
| 64 | 4 | private function getHeaders(ServerRequestInterface $request): array |
|
| 73 | |||
| 74 | /** |
||
| 75 | * @return string[] |
||
| 76 | */ |
||
| 77 | 1 | public function getAllowedHeaders(): array |
|
| 81 | } |
||
| 82 |