Class RoutingMiddleware
Applies routing rules to the request and creates the controller instance if possible.
Namespace: Cake\Routing\Middleware
Method Summary
-
__construct() public
Constructor
-
loadRoutes() protected
Trigger the application's and plugin's routes() hook.
-
process() public
Apply routing and update the request.
Any route/path specific middleware will be wrapped around $next and then the new middleware stack will be invoked.
Method Detail
__construct() ¶ public
__construct(Cake\Routing\RoutingApplicationInterface $app)
Constructor
Parameters
-
Cake\Routing\RoutingApplicationInterface$app The application instance that routes are defined on.
loadRoutes() ¶ protected
loadRoutes(): void
Trigger the application's and plugin's routes() hook.
Returns
voidprocess() ¶ public
process(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface
Apply routing and update the request.
Any route/path specific middleware will be wrapped around $next and then the new middleware stack will be invoked.
Parameters
-
ServerRequestInterface$request The request.
-
RequestHandlerInterface$handler The request handler.
Returns
Psr\Http\Message\ResponseInterfaceA response.