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

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

pluginBootstrap()source public

pluginBootstrap( )

Run bootstrap logic for loaded plugins.

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.7/class-Cake.Core.PluginApplicationInterface.html