1 | <?php |
||
10 | class Route implements RouteInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var string[] |
||
14 | */ |
||
15 | protected $methods; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $path; |
||
21 | |||
22 | /** |
||
23 | * @var callable |
||
24 | */ |
||
25 | protected $handler; |
||
26 | |||
27 | /** |
||
28 | * @param string[] $methods |
||
29 | * @param string $path |
||
30 | * @param callable $handler |
||
31 | */ |
||
32 | public function __construct(array $methods, string $path, callable $handler) |
||
38 | |||
39 | /** |
||
40 | * @return string[] |
||
41 | */ |
||
42 | public function getMethods(): array |
||
46 | |||
47 | /** |
||
48 | * @return string |
||
49 | */ |
||
50 | public function getPath(): string |
||
54 | |||
55 | /** |
||
56 | * @return callable |
||
57 | */ |
||
58 | public function getHandler(): callable |
||
62 | } |
||
63 |