1 | <?php |
||
14 | class RouteDispatcher implements RouteDispatcherInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var RouteCollection |
||
18 | */ |
||
19 | private $collection; |
||
20 | |||
21 | /** |
||
22 | * @var DispatcherInterface |
||
23 | */ |
||
24 | private $dispatcher; |
||
25 | |||
26 | /** |
||
27 | * @param DispatcherInterface $dispatcher |
||
28 | * @param RouteCollection $collection |
||
29 | */ |
||
30 | 4 | public function __construct(DispatcherInterface $dispatcher, RouteCollection $collection) |
|
35 | |||
36 | /** |
||
37 | * Dispatch the request |
||
38 | * |
||
39 | * @param ServerRequestInterface $request |
||
40 | * @throws MethodNotAllowedException |
||
41 | * @throws NotFoundHttpException |
||
42 | * @return mixed |
||
43 | */ |
||
44 | 4 | public function dispatch(ServerRequestInterface $request) |
|
68 | |||
69 | /** |
||
70 | * @return Dispatcher |
||
71 | */ |
||
72 | private function createDispatcher() |
||
80 | } |
||
81 |