TrackManiaControl/application/core/Libs/Symfony/Component/EventDispatcher
2014-05-01 17:35:23 +02:00
..
Debug curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
Tests curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
.gitignore curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
CHANGELOG.md curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
composer.json curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
ContainerAwareEventDispatcher.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
Event.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
EventDispatcher.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
EventDispatcherInterface.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
EventSubscriberInterface.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
GenericEvent.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
ImmutableEventDispatcher.php curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
LICENSE curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
phpunit.xml.dist curl-easy / event dispatcher lib 2014-05-01 17:35:23 +02:00
README.md curl-easy / event dispatcher lib 2014-05-01 17:35:23 +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