1 | <?php |
||
11 | final 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 | 6 | public function __construct(RequestMatcherInterface $matcher, RequestHandlerInterface $handler, string $name = null) |
|
28 | |||
29 | 2 | public function getName(): ?string |
|
33 | |||
34 | 1 | public function name(string $name): self |
|
39 | |||
40 | 3 | public function match(ServerRequestInterface $request): RequestMatchResultInterface |
|
44 | |||
45 | 2 | public function getHandler(): RequestHandlerInterface |
|
49 | } |
||
50 |