Plugin Interface
array
VALID_HOOKS ['routes','bootstrap','console','middleware'] bootstrap( Cake\Core\PluginApplicationInterface $app )
Load all the application configuration and bootstrap logic.
The default implementation of this method will include the config/bootstrap.php in the plugin if it exist. You can override this method to replace that behavior.
The host application is provided as an argument. This allows you to load additional plugin dependencies, or attach events.
Cake\Core\PluginApplicationInterface $app console( Cake\Console\CommandCollection $commands )
Add console commands for the plugin.
Cake\Console\CommandCollection $commands Cake\Console\CommandCollectiondisable( string $hook )
Disables the named hook
$hook enable( string $hook )
Enables the named hook
$hook getClassPath( )
Get the filesystem path to configuration for this plugin
getConfigPath( )
Get the filesystem path to configuration for this plugin
isEnabled( string $hook )
Check if the named hook is enabled
$hook middleware( Cake\Http\MiddlewareQueue $middleware )
Add middleware for the plugin.
Cake\Http\MiddlewareQueue $middleware Cake\Http\MiddlewareQueueroutes( Cake\Routing\RouteBuilder $routes )
Add routes for the plugin.
The default implementation of this method will include the config/routes.php in the plugin if it exists. You can override this method to replace that behavior.
Cake\Routing\RouteBuilder $routes
© 2005–present 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.8/class-Cake.Core.PluginInterface.html