1 | <?php |
||
10 | class FastRoute |
||
11 | { |
||
12 | use Utils\CallableTrait; |
||
13 | |||
14 | /** |
||
15 | * @var Dispatcher FastRoute dispatcher |
||
16 | */ |
||
17 | private $router; |
||
18 | |||
19 | /** |
||
20 | * Set the Dispatcher instance. |
||
21 | * |
||
22 | * @param Dispatcher|null $router |
||
23 | */ |
||
24 | public function __construct(Dispatcher $router) |
||
28 | |||
29 | /** |
||
30 | * Execute the middleware. |
||
31 | * |
||
32 | * @param ServerRequestInterface $request |
||
33 | * @param ResponseInterface $response |
||
34 | * @param callable $next |
||
35 | * |
||
36 | * @return ResponseInterface |
||
37 | */ |
||
38 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
58 | } |
||
59 |