Nenhuma Descrição

sunhao fe08a6fbcc 初始 5 anos atrás
..
Debug fe08a6fbcc 初始 5 anos atrás
DependencyInjection fe08a6fbcc 初始 5 anos atrás
Tests fe08a6fbcc 初始 5 anos atrás
.gitignore fe08a6fbcc 初始 5 anos atrás
CHANGELOG.md fe08a6fbcc 初始 5 anos atrás
ContainerAwareEventDispatcher.php fe08a6fbcc 初始 5 anos atrás
Event.php fe08a6fbcc 初始 5 anos atrás
EventDispatcher.php fe08a6fbcc 初始 5 anos atrás
EventDispatcherInterface.php fe08a6fbcc 初始 5 anos atrás
EventSubscriberInterface.php fe08a6fbcc 初始 5 anos atrás
GenericEvent.php fe08a6fbcc 初始 5 anos atrás
ImmutableEventDispatcher.php fe08a6fbcc 初始 5 anos atrás
LICENSE fe08a6fbcc 初始 5 anos atrás
README.md fe08a6fbcc 初始 5 anos atrás
composer.json fe08a6fbcc 初始 5 anos atrás
phpunit.xml.dist fe08a6fbcc 初始 5 anos atrás

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