Brak opisu

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

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