David 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
..
Debug 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
DependencyInjection 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
Tests 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
CHANGELOG.md 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
ContainerAwareEventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
Event.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
EventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
EventDispatcherInterface.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
EventSubscriberInterface.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
GenericEvent.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
ImmutableEventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
LICENSE 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
README.md 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад
phpunit.xml.dist 228fc0d08c De TakaraSoftware vers IIMT 4 лет назад

README.md

EventDispatcher Component

The Symfony EventDispatcher component implements the Mediator pattern in a simple and effective way to make your projects truly extensible.

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 install
$ phpunit