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

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