1 | <?php |
||
10 | class Router implements RouterInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var array $routes |
||
14 | */ |
||
15 | protected $routes; |
||
16 | |||
17 | /** |
||
18 | * @var FastRoute\Dispatcher $routeDispatcher |
||
19 | */ |
||
20 | protected $routeDispatcher; |
||
21 | |||
22 | public function __construct(array $routes) |
||
27 | |||
28 | /** |
||
29 | * Prepares the route dispatcher. |
||
30 | * |
||
31 | * @return void |
||
32 | */ |
||
33 | protected function bootstrapDispatcher(): void |
||
41 | |||
42 | /** |
||
43 | * Dispatches HTTP request and returns route information. |
||
44 | * |
||
45 | * @param string $httpMethod |
||
46 | * @param string $uri |
||
47 | * @return array |
||
48 | */ |
||
49 | public function dispatch(string $httpMethod, string $uri) : array |
||
55 | } |
||
56 |