1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/movim_ynh.git synced 2024-09-03 19:46:19 +02:00
movim_ynh/sources/vendor/symfony/event-dispatcher
2016-03-14 23:16:11 +01:00
..
Debug update to movim upstream 2016-03-14 23:16:11 +01:00
DependencyInjection update to movim upstream 2016-03-14 23:16:11 +01:00
Tests update to movim upstream 2016-03-14 23:16:11 +01:00
.gitignore update to movim upstream 2016-03-14 23:16:11 +01:00
CHANGELOG.md update to movim upstream 2016-03-14 23:16:11 +01:00
composer.json update to movim upstream 2016-03-14 23:16:11 +01:00
ContainerAwareEventDispatcher.php update to movim upstream 2016-03-14 23:16:11 +01:00
Event.php update to movim upstream 2016-03-14 23:16:11 +01:00
EventDispatcher.php update to movim upstream 2016-03-14 23:16:11 +01:00
EventDispatcherInterface.php update to movim upstream 2016-03-14 23:16:11 +01:00
EventSubscriberInterface.php update to movim upstream 2016-03-14 23:16:11 +01:00
GenericEvent.php update to movim upstream 2016-03-14 23:16:11 +01:00
ImmutableEventDispatcher.php update to movim upstream 2016-03-14 23:16:11 +01:00
LICENSE update to movim upstream 2016-03-14 23:16:11 +01:00
phpunit.xml.dist update to movim upstream 2016-03-14 23:16:11 +01:00
README.md update to movim upstream 2016-03-14 23:16:11 +01:00

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