$_eventManager
$_eventManager : \Cake\Event\EventManagerInterface|\Cake\Event\EventManager
Instance of the Cake\Event\EventManager this object is using to dispatch inner events.
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.
$_eventManager : \Cake\Event\EventManagerInterface|\Cake\Event\EventManager
Instance of the Cake\Event\EventManager this object is using to dispatch inner events.
$plugins : \Cake\Core\PluginCollection
Plugin Collection
eventManager(\Cake\Event\EventManager|null $eventManager = null) : \Cake\Event\EventManager
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
\Cake\Event\EventManager|null | $eventManager | the eventManager to set |
getEventManager() : \Cake\Event\EventManager
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
None found |
setEventManager(\Cake\Event\EventManager $eventManager) : $this
Returns the Cake\Event\EventManager manager instance for this object.
You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.
\Cake\Event\EventManager | $eventManager | the eventManager to set |
None found |
dispatchEvent(string $name, array|null $data = null, object|null $subject = null) : \Cake\Event\Event
Wrapper for creating and dispatching events.
Returns a dispatched event.
string | $name | Name of the event. |
array|null | $data | Any value you wish to be transported with this event to it can be read by listeners. |
object|null | $subject | The object that this event applies to ($this by default). |
None found |
__construct(string $configDir, \Cake\Event\EventManagerInterface $eventManager = null)
Constructor
string | $configDir | The directory the bootstrap configuration is held in. |
\Cake\Event\EventManagerInterface | $eventManager | Application event manager instance. |
None found |
middleware(\Cake\Http\MiddlewareQueue $middleware) : \Cake\Http\MiddlewareQueue
Define the HTTP middleware layers for an application.
\Cake\Http\MiddlewareQueue | $middleware | The middleware queue to set in your App Class |
None found |
pluginMiddleware(\Cake\Http\MiddlewareQueue $middleware) : \Cake\Http\MiddlewareQueue
Run middleware hooks for plugins
\Cake\Http\MiddlewareQueue | $middleware | The MiddlewareQueue to use. |
None found |
addPlugin(string|\Cake\Core\PluginInterface $name, array $config = array()) : $this
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.
string|\Cake\Core\PluginInterface | $name | The plugin name or plugin object. |
array | $config | The configuration data for the plugin if using a string for $name |
None found |
getPlugins() : \Cake\Core\PluginCollection
Get the plugin collection in use.
None found |
bootstrap() : void
Load all the application configuration and bootstrap logic.
Override this method to add additional bootstrap logic for your application.
None found |
None found |
routes(\Cake\Routing\RouteBuilder $routes) : void
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 | A route builder to add routes into. |
None found |
pluginRoutes(\Cake\Routing\RouteBuilder $routes) : \Cake\Routing\RouteBuilder
Run routes hooks for loaded plugins
\Cake\Routing\RouteBuilder | $routes | The route builder to use. |
None found |
console(\Cake\Console\CommandCollection $commands) : \Cake\Console\CommandCollection
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 | The CommandCollection to add commands into. |
The updated collection.
None found |
pluginConsole(\Cake\Console\CommandCollection $commands) : \Cake\Console\CommandCollection
Run console hooks for plugins
\Cake\Console\CommandCollection | $commands | The CommandCollection to use. |
None found |
__invoke(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, callable $next) : \Psr\Http\Message\ResponseInterface
Invoke the application.
\Psr\Http\Message\ServerRequestInterface | $request | The request |
\Psr\Http\Message\ResponseInterface | $response | The response |
callable | $next | The next middleware |
None found |
makePlugin(string $name, array $config) : \Cake\Core\PluginInterface
Create a plugin instance from a classname and configuration
string | $name | The plugin classname |
array | $config | Configuration options for the plugin |
None found |
getDispatcher() : \Cake\Http\ActionDispatcher
Get the ActionDispatcher.
None found |