I'm little confused with EventDispatcher
. I use some Symfony components but not all Symfony. I also don't use Symfony HttpKernel.
I understand that I can provide event dispatcher as a service for all controllers. Controllers are calling from my kernel level and dependency injection works well.
But I need to dispatch events not only from the controllers but also from for example event handlers. controller->event->eventHandler->anotherEvent->eventHandler
. Does exists the way to provide this service for every event handler or event subscribers, whatever name we will use?
In theory, I can add some global function what will call to dispatcher but I'd like to avoid global functions/helpers.
Thanks for any hints.