Bachir Soussi Chiadmi ad38015ea9 first commit : grave core and admin plugin | %!s(int64=9) %!d(string=hai) anos | |
---|---|---|
.. | ||
Debug | %!s(int64=9) %!d(string=hai) anos | |
DependencyInjection | %!s(int64=9) %!d(string=hai) anos | |
Tests | %!s(int64=9) %!d(string=hai) anos | |
CHANGELOG.md | %!s(int64=9) %!d(string=hai) anos | |
ContainerAwareEventDispatcher.php | %!s(int64=9) %!d(string=hai) anos | |
Event.php | %!s(int64=9) %!d(string=hai) anos | |
EventDispatcher.php | %!s(int64=9) %!d(string=hai) anos | |
EventDispatcherInterface.php | %!s(int64=9) %!d(string=hai) anos | |
EventSubscriberInterface.php | %!s(int64=9) %!d(string=hai) anos | |
GenericEvent.php | %!s(int64=9) %!d(string=hai) anos | |
ImmutableEventDispatcher.php | %!s(int64=9) %!d(string=hai) anos | |
LICENSE | %!s(int64=9) %!d(string=hai) anos | |
README.md | %!s(int64=9) %!d(string=hai) anos | |
composer.json | %!s(int64=9) %!d(string=hai) anos | |
phpunit.xml.dist | %!s(int64=9) %!d(string=hai) anos |
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');
You can run the unit tests with the following command:
$ cd path/to/Symfony/Component/EventDispatcher/
$ composer install
$ phpunit