Event Dispatcher

Tomahawk uses the Symfony2 Event Dispatcher as it is quite powerful and easy to use.

To access the event dispatcher just add the following parameter to the construct method of your Controller Symfony\Component\EventDispatcher\EventDispatcherInterface and it will get injected in through the Service Container.

You can even access it throught the container by doing $this->container->get('event_dispatcher').

For more information on how to use it please read the Symfony2 docs.