1 | <?php |
||
8 | class Route |
||
9 | { |
||
10 | /** @var string */ |
||
11 | protected $path; |
||
12 | /** @var RequestHandlerInterface */ |
||
13 | protected $handler; |
||
14 | /** @var array */ |
||
15 | protected $matches = []; |
||
16 | /** @var array */ |
||
17 | protected $methods = []; |
||
18 | /** @var array */ |
||
19 | protected $restrictions = []; |
||
20 | |||
21 | 22 | public function __construct(string $path, RequestHandlerInterface $handler) |
|
26 | |||
27 | 4 | public function setMatches(array $values = []): self |
|
32 | |||
33 | 4 | public function getMatchesParams(): array |
|
37 | |||
38 | 13 | public function getMethods(): array |
|
42 | |||
43 | 9 | public function setMethods(array $methods): self |
|
48 | |||
49 | 4 | public function setRestrictions(array $restrictions): self |
|
54 | |||
55 | 9 | public function getRestrictions(): array |
|
59 | |||
60 | 1 | public function getHandler(): RequestHandlerInterface |
|
64 | |||
65 | 9 | public function getPath(): string |
|
69 | } |