Daniel ab1334c0cf the whole shebang il y a 10 ans
..
Debug ab1334c0cf the whole shebang il y a 10 ans
Tests ab1334c0cf the whole shebang il y a 10 ans
.gitignore ab1334c0cf the whole shebang il y a 10 ans
CHANGELOG.md ab1334c0cf the whole shebang il y a 10 ans
ContainerAwareEventDispatcher.php ab1334c0cf the whole shebang il y a 10 ans
Event.php ab1334c0cf the whole shebang il y a 10 ans
EventDispatcher.php ab1334c0cf the whole shebang il y a 10 ans
EventDispatcherInterface.php ab1334c0cf the whole shebang il y a 10 ans
EventSubscriberInterface.php ab1334c0cf the whole shebang il y a 10 ans
GenericEvent.php ab1334c0cf the whole shebang il y a 10 ans
ImmutableEventDispatcher.php ab1334c0cf the whole shebang il y a 10 ans
LICENSE ab1334c0cf the whole shebang il y a 10 ans
README.md ab1334c0cf the whole shebang il y a 10 ans
composer.json ab1334c0cf the whole shebang il y a 10 ans
phpunit.xml.dist ab1334c0cf the whole shebang il y a 10 ans

README.md

EventDispatcher Component

EventDispatcher implements a lightweight version of the Observer design pattern.

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 --dev
$ phpunit