I'm trying to get a better understanding of events. One thing I'm unsure of is where we can get the component names of what we want to attach to. For instance:
$di->set('dispatcher', function () use $di {
$dispatcher = new Dispatcher();
$dispatcher->setDefaultNamespace('Vokuro\Controllers');
return $dispatcher;
});
Even though the service is called "dispatcher" if i want to attach a listener to this component, I need to use:
$eventsManager = $di->getShared('eventsManager');
$listener = new ListenerClass($di);
$eventsManager->attach('dispatch', $listener);
So how would we know to use "dispatch" for the dispatcher, or "db" for the database component? Is there a list somewhere I'm not seeing of all the event aware components we can set listeners too?
--Mark