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

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