Reputation: 2182
Is there an event that gets fired after my custom services are created but before the controller action is called?
And is there a full list of all events in Symfony2?
Upvotes: 2
Views: 1109
Reputation: 12805
Here you have a list of events, though I'm not sure if it is complete:
http://symfony.com/doc/current/book/internals.html#events
Upvotes: 2
Reputation: 28239
One of the nice things about the DIC (Dependency Injection Container) is that the services are only created when you actually need them. This means that most services will be invoked and thus created from within the controller.
To answer your question, there is the kernel.request
event that is fired before the controller, so you can use that.
Upvotes: 5