Interface PluginApplicationInterface
Interface for Applications that leverage plugins & events.
Events can be bound to the application event manager during the application's bootstrap and plugin bootstrap.
- Cake\Core\PluginApplicationInterface implements Cake\Event\EventDispatcherInterface
Direct Implementers
Method Summary
- addPlugin() publicAdd a plugin to the loaded plugin set.
- pluginBootstrap() publicRun bootstrap logic for loaded plugins.
- pluginConsole() publicRun console hooks for plugins
- pluginMiddleware() publicRun middleware hooks for plugins
- pluginRoutes() publicRun routes hooks for loaded plugins
Method Detail
addPlugin()source public
addPlugin( string|Cake\Core\PluginInterface $name , array $config = [] )
Add a plugin to the loaded plugin set.
If the named plugin does not exist, or does not define a Plugin class, an instance of Cake\Core\BasePlugin
will be used. This generated class will have all plugin hooks enabled.
Parameters
- string|
Cake\Core\PluginInterface
$name
- The plugin name or plugin object.
- array
$config
optional [] - The configuration data for the plugin if using a string for $name
Returns
$this
pluginConsole()source public
pluginConsole( Cake\Console\CommandCollection $commands )
Run console hooks for plugins
Parameters
-
Cake\Console\CommandCollection
$commands
- The CommandCollection to use.
Returns
Cake\Console\CommandCollection
pluginMiddleware()source public
pluginMiddleware( Cake\Http\MiddlewareQueue $middleware )
Run middleware hooks for plugins
Parameters
-
Cake\Http\MiddlewareQueue
$middleware
- The MiddlewareQueue to use.
Returns
Cake\Http\MiddlewareQueue
pluginRoutes()source public
pluginRoutes( Cake\Routing\RouteBuilder $routes )
Run routes hooks for loaded plugins
Parameters
-
Cake\Routing\RouteBuilder
$routes
- The route builder to use.
Returns
Cake\Routing\RouteBuilder
Magic methods inherited from Cake\Event\EventDispatcherInterface
getEventManager() |
© 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.6/class-Cake.Core.PluginApplicationInterface.html