1 | <?php |
||
23 | class Router |
||
24 | { |
||
25 | /** |
||
26 | * Instance of route collection |
||
27 | * |
||
28 | * @var \Kambo\Router\Matcher |
||
29 | */ |
||
30 | private $matcher; |
||
31 | |||
32 | /** |
||
33 | * Instance of Dispatcher which will dispatch the request |
||
34 | * |
||
35 | * @var \Kambo\Router\Dispatcher |
||
36 | */ |
||
37 | private $dispatcher; |
||
38 | |||
39 | /** |
||
40 | * Defualt constructor |
||
41 | * |
||
42 | * @param \Kambo\Router\Dispatcher $dispatcher |
||
43 | * @param \Kambo\Router\Matcher $matcher |
||
44 | * |
||
45 | */ |
||
46 | 20 | public function __construct( |
|
53 | |||
54 | /** |
||
55 | * Match request with provided routes. |
||
56 | * |
||
57 | * @param ServerRequest $request instance of PSR 7 compatible request object |
||
58 | * @param array $parameters Additional parameters which will be passed into |
||
59 | * the dispatcher. |
||
60 | * |
||
61 | * @return mixed |
||
62 | */ |
||
63 | 20 | public function dispatch(ServerRequest $request, array $parameters = []) |
|
72 | } |
||
73 |