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 | public function __construct(Result $routeResult, ConfigInterface $routeConfig, $applicationPath = '/') |
||
61 | |||
62 | /** |
||
63 | * According to the application path, determines the route uri |
||
64 | * |
||
65 | * @param ServerRequestInterface $request |
||
66 | * |
||
67 | * @return string |
||
68 | */ |
||
69 | private function getApplicationRouteUri(ServerRequestInterface $request) |
||
83 | |||
84 | /** |
||
85 | * Processes the Request and give a Result. |
||
86 | * |
||
87 | * @param ServerRequestInterface $request |
||
88 | * |
||
89 | * @return Result |
||
90 | */ |
||
91 | public function match(ServerRequestInterface $request) |
||
113 | } |
||
114 |