Class MiddlewareApplication
Base class for standalone HTTP applications
Provides a base class to inherit from for applications using only the http package. This class defines a fallback handler that renders a simple 404 response.
You can overload the handle method to provide your own logic
to run when no middleware generates a response.
Method Summary
- 
          bootstrap() abstract publicLoad all the application configuration and bootstrap logic. 
- 
          handle() publicGenerate a 404 response as no middleware handled the request. 
- 
          middleware() abstract publicDefine the HTTP middleware layers for an application. 
Method Detail
bootstrap() ¶ abstract public
bootstrap(): voidLoad all the application configuration and bootstrap logic.
Override this method to add additional bootstrap logic for your application.
Returns
voidhandle() ¶ public
handle(ServerRequestInterface $request): Psr\Http\Message\ResponseInterfaceGenerate a 404 response as no middleware handled the request.
May call other collaborating code to generate the response.
Parameters
- 
                ServerRequestInterface$request
- The request 
Returns
Psr\Http\Message\ResponseInterfacemiddleware() ¶ abstract public
middleware(Cake\Http\MiddlewareQueue $middlewareQueue): Cake\Http\MiddlewareQueueDefine the HTTP middleware layers for an application.
Parameters
- 
                Cake\Http\MiddlewareQueue$middlewareQueue
Returns
Cake\Http\MiddlewareQueue