TrackManiaControl/application/libs/Symfony/Component/EventDispatcher
2014-08-03 13:02:02 +02:00
..
Debug moved Libs out of core folder 2014-08-03 13:02:02 +02:00
Tests moved Libs out of core folder 2014-08-03 13:02:02 +02:00
.gitignore moved Libs out of core folder 2014-08-03 13:02:02 +02:00
CHANGELOG.md moved Libs out of core folder 2014-08-03 13:02:02 +02:00
composer.json moved Libs out of core folder 2014-08-03 13:02:02 +02:00
ContainerAwareEventDispatcher.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
Event.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
EventDispatcher.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
EventDispatcherInterface.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
EventSubscriberInterface.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
GenericEvent.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
ImmutableEventDispatcher.php moved Libs out of core folder 2014-08-03 13:02:02 +02:00
LICENSE moved Libs out of core folder 2014-08-03 13:02:02 +02:00
phpunit.xml.dist moved Libs out of core folder 2014-08-03 13:02:02 +02:00
README.md moved Libs out of core folder 2014-08-03 13:02:02 +02:00

EventDispatcher Component

The Symfony2 EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible.

use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;

$dispatcher = new EventDispatcher();

$dispatcher->addListener('event_name', function (Event $event) {
    // ...
});

$dispatcher->dispatch('event_name');

Resources

You can run the unit tests with the following command:

$ cd path/to/Symfony/Component/EventDispatcher/
$ composer.phar install
$ phpunit