Events Manager Service
Configuration
Changing the Events Manager Service Provider
PROVIDER_EVENTS=\Zemit\Provider\EventsManager\ServiceProvider
Events Manager Service (eventsManager
)
Events Service Provider
Events Service Provider (eventsManager
): \Zemit\Provider\Events\ServiceProvider
<?php
// Retrieving the service from an Injectable
$events = $this->eventsManager;
// Retrieving the service from the DI
$events = $this->di->get('eventsManager');
// Retrieving the service from the getDI()
$events = $this->getDI()->get('eventsManager');
// Retrieving the service from anywhere
$events = Di::getDefault()->get('eventsManager');