TrackManiaControl/libs/Symfony/Component/EventDispatcher
2014-09-29 18:20:09 +02:00
..
Debug removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
Tests removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
.gitignore removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
CHANGELOG.md removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
composer.json removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
ContainerAwareEventDispatcher.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
Event.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
EventDispatcher.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
EventDispatcherInterface.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
EventSubscriberInterface.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
GenericEvent.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
ImmutableEventDispatcher.php removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
LICENSE removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
phpunit.xml.dist removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +02:00
README.md removed 'application' folder to have everything in the root directory 2014-09-29 18:20:09 +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