1 | <?php |
||
9 | final class MethodNegotiator implements MethodNegotiatorInterface |
||
10 | { |
||
11 | /** |
||
12 | * @var string[] |
||
13 | */ |
||
14 | private $allowMethods; |
||
15 | |||
16 | /** |
||
17 | * @param string[] $allowMethods |
||
18 | */ |
||
19 | 4 | public function __construct(array $allowMethods) |
|
26 | |||
27 | /** |
||
28 | * @param string $allowMethod |
||
29 | */ |
||
30 | 4 | private function addAllowMethod(string $allowMethod): void |
|
34 | |||
35 | /** |
||
36 | * @param ServerRequestInterface $request |
||
37 | * |
||
38 | * @return bool |
||
39 | */ |
||
40 | 3 | public function negotiate(ServerRequestInterface $request): bool |
|
54 | |||
55 | /** |
||
56 | * @return string[] |
||
57 | */ |
||
58 | 1 | public function getAllowedMethods(): array |
|
62 | } |
||
63 |