Aucune description

sunhao fe08a6fbcc 初始 il y a 5 ans
..
Debug fe08a6fbcc 初始 il y a 5 ans
DependencyInjection fe08a6fbcc 初始 il y a 5 ans
Tests fe08a6fbcc 初始 il y a 5 ans
.gitignore fe08a6fbcc 初始 il y a 5 ans
CHANGELOG.md fe08a6fbcc 初始 il y a 5 ans
ContainerAwareEventDispatcher.php fe08a6fbcc 初始 il y a 5 ans
Event.php fe08a6fbcc 初始 il y a 5 ans
EventDispatcher.php fe08a6fbcc 初始 il y a 5 ans
EventDispatcherInterface.php fe08a6fbcc 初始 il y a 5 ans
EventSubscriberInterface.php fe08a6fbcc 初始 il y a 5 ans
GenericEvent.php fe08a6fbcc 初始 il y a 5 ans
ImmutableEventDispatcher.php fe08a6fbcc 初始 il y a 5 ans
LICENSE fe08a6fbcc 初始 il y a 5 ans
README.md fe08a6fbcc 初始 il y a 5 ans
composer.json fe08a6fbcc 初始 il y a 5 ans
phpunit.xml.dist fe08a6fbcc 初始 il y a 5 ans

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