1 | <?php |
||
24 | class FastRouteAdapter implements RouterAdapterInterface |
||
25 | { |
||
26 | /** @var Result */ |
||
27 | private $result; |
||
28 | /** @var ConfigInterface */ |
||
29 | private $config; |
||
30 | /** @var Dispatcher */ |
||
31 | private $adapter; |
||
32 | /** @var string */ |
||
33 | private $applicationPath; |
||
34 | |||
35 | /** |
||
36 | * FastRouteAdapter constructor. |
||
37 | * |
||
38 | * @param Result $routeResult |
||
39 | * @param ConfigInterface $routeConfig |
||
40 | * @param string $applicationPath |
||
41 | */ |
||
42 | 4 | public function __construct(Result $routeResult, ConfigInterface $routeConfig, $applicationPath = '/') |
|
62 | |||
63 | /** |
||
64 | * According to the application path, determines the route uri |
||
65 | * |
||
66 | * @param ServerRequestInterface $request |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | 3 | private function getApplicationRouteUri(ServerRequestInterface $request) |
|
80 | |||
81 | /** |
||
82 | * Processes the Request and give a Result. |
||
83 | * |
||
84 | * @param ServerRequestInterface $request |
||
85 | * |
||
86 | * @return Result |
||
87 | */ |
||
88 | 2 | public function match(ServerRequestInterface $request) |
|
110 | } |
||
111 |