Base class for application classes.
The application class is responsible for bootstrapping the application, and ensuring that middleware is attached. It is also invoked as the last piece of middleware, and delegates request/response handling to the correct controller.
$configDir
protected string
__construct( string $configDir )
Constructor
$configDir
__invoke( Psr\Http\Message\ServerRequestInterface $request , Psr\Http\Message\ResponseInterface $response , callable $next )
Invoke the application.
$request
$response
$next
Cake\Core\HttpApplicationInterface::__invoke()
bootstrap( )
Load all the application configuration and bootstrap logic.
Cake\Core\ConsoleApplicationInterface::bootstrap()
console( Cake\Console\CommandCollection $commands )
Define the console commands for an application.
By default all commands in CakePHP, plugins and the application will be loaded using conventions based names.
Cake\Console\CommandCollection
$commands
Cake\Console\CommandCollection
Cake\Core\ConsoleApplicationInterface::console()
getDispatcher( )
Get the ActionDispatcher.
Cake\Http\ActionDispatcher
middleware( Cake\Http\MiddlewareQueue $middleware )
Cake\Http\MiddlewareQueue
$middleware
Cake\Http\MiddlewareQueue
Cake\Core\HttpApplicationInterface::middleware()
routes( Cake\Routing\RouteBuilder $routes )
Define the routes for an application.
By default this will load config/routes.php
for ease of use and backwards compatibility.
Cake\Routing\RouteBuilder
$routes
Cake\Core\HttpApplicationInterface::routes()
© 2005–2017 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/3.5/class-Cake.Http.BaseApplication.html