1 | <?php |
||
11 | class Route |
||
12 | { |
||
13 | /** @var string */ |
||
14 | private $name; |
||
15 | |||
16 | /** @var RequestMatcherInterface */ |
||
17 | private $matcher; |
||
18 | |||
19 | /** @var RequestHandlerInterface */ |
||
20 | private $handler; |
||
21 | |||
22 | 5 | public function __construct(string $name, RequestMatcherInterface $matcher, RequestHandlerInterface $handler) |
|
28 | |||
29 | 1 | public function getName(): string |
|
30 | { |
||
31 | 1 | return $this->name; |
|
32 | } |
||
33 | |||
34 | 3 | public function match(ServerRequestInterface $request): RequestMatchResultInterface |
|
38 | |||
39 | 2 | public function getHandler(): RequestHandlerInterface |
|
43 | } |
||
44 |