David 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
..
Debug 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
DependencyInjection 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
Tests 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
CHANGELOG.md 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
ContainerAwareEventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
Event.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
EventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
EventDispatcherInterface.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
EventSubscriberInterface.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
GenericEvent.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
ImmutableEventDispatcher.php 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
LICENSE 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
README.md 228fc0d08c De TakaraSoftware vers IIMT 4 years ago
phpunit.xml.dist 228fc0d08c De TakaraSoftware vers IIMT 4 years ago

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