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

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