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