1 | <?php |
||
17 | class Router implements RouterInterface |
||
18 | { |
||
19 | /** |
||
20 | * @var Route[] |
||
21 | */ |
||
22 | private $routes; |
||
23 | |||
24 | /** |
||
25 | * @var RequestHandlerBuilderInterface |
||
26 | */ |
||
27 | private $builder; |
||
28 | |||
29 | /** |
||
30 | * @var RoutingResultFactory |
||
31 | */ |
||
32 | private $resultFactory; |
||
33 | |||
34 | 2 | public function __construct(RequestHandlerBuilderInterface $builder, RoutingResultFactory $resultFactory) |
|
40 | |||
41 | 2 | private function addRoute(Route $route): Route |
|
46 | |||
47 | 2 | public function add(RequestMatcherInterface $matcher, $coreHandlerRef, array $middlewareRefs = []): Route |
|
52 | |||
53 | 2 | public function match(ServerRequestInterface $request): RoutingResultInterface |
|
69 | } |
||
70 |