alimiracle 24e7577a47 make all 9 年之前
..
Debug 24e7577a47 make all 9 年之前
DependencyInjection 24e7577a47 make all 9 年之前
Tests 24e7577a47 make all 9 年之前
.gitignore 24e7577a47 make all 9 年之前
CHANGELOG.md 24e7577a47 make all 9 年之前
ContainerAwareEventDispatcher.php 24e7577a47 make all 9 年之前
Event.php 24e7577a47 make all 9 年之前
EventDispatcher.php 24e7577a47 make all 9 年之前
EventDispatcherInterface.php 24e7577a47 make all 9 年之前
EventSubscriberInterface.php 24e7577a47 make all 9 年之前
GenericEvent.php 24e7577a47 make all 9 年之前
ImmutableEventDispatcher.php 24e7577a47 make all 9 年之前
LICENSE 24e7577a47 make all 9 年之前
README.md 24e7577a47 make all 9 年之前
composer.json 24e7577a47 make all 9 年之前
phpunit.xml.dist 24e7577a47 make all 9 年之前

README.md

EventDispatcher Component

The Symfony2 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