Daniel ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
..
Debug ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
Tests ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
.gitignore ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
CHANGELOG.md ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
ContainerAwareEventDispatcher.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
Event.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
EventDispatcher.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
EventDispatcherInterface.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
EventSubscriberInterface.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
GenericEvent.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
ImmutableEventDispatcher.php ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
LICENSE ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
README.md ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
composer.json ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos
phpunit.xml.dist ab1334c0cf the whole shebang %!s(int64=10) %!d(string=hai) anos

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