Daniel ab1334c0cf the whole shebang 10 лет назад
..
Debug ab1334c0cf the whole shebang 10 лет назад
Tests ab1334c0cf the whole shebang 10 лет назад
.gitignore ab1334c0cf the whole shebang 10 лет назад
CHANGELOG.md ab1334c0cf the whole shebang 10 лет назад
ContainerAwareEventDispatcher.php ab1334c0cf the whole shebang 10 лет назад
Event.php ab1334c0cf the whole shebang 10 лет назад
EventDispatcher.php ab1334c0cf the whole shebang 10 лет назад
EventDispatcherInterface.php ab1334c0cf the whole shebang 10 лет назад
EventSubscriberInterface.php ab1334c0cf the whole shebang 10 лет назад
GenericEvent.php ab1334c0cf the whole shebang 10 лет назад
ImmutableEventDispatcher.php ab1334c0cf the whole shebang 10 лет назад
LICENSE ab1334c0cf the whole shebang 10 лет назад
README.md ab1334c0cf the whole shebang 10 лет назад
composer.json ab1334c0cf the whole shebang 10 лет назад
phpunit.xml.dist ab1334c0cf the whole shebang 10 лет назад

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