site-accueil-insa/matomo/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher
2022-10-26 08:59:36 +02:00
..
Debug total photo count for zip files 2022-10-26 08:59:36 +02:00
DependencyInjection total photo count for zip files 2022-10-26 08:59:36 +02:00
CHANGELOG.md total photo count for zip files 2022-10-26 08:59:36 +02:00
ContainerAwareEventDispatcher.php total photo count for zip files 2022-10-26 08:59:36 +02:00
Event.php total photo count for zip files 2022-10-26 08:59:36 +02:00
EventDispatcher.php total photo count for zip files 2022-10-26 08:59:36 +02:00
EventDispatcherInterface.php total photo count for zip files 2022-10-26 08:59:36 +02:00
EventSubscriberInterface.php total photo count for zip files 2022-10-26 08:59:36 +02:00
GenericEvent.php total photo count for zip files 2022-10-26 08:59:36 +02:00
ImmutableEventDispatcher.php total photo count for zip files 2022-10-26 08:59:36 +02:00
LICENSE total photo count for zip files 2022-10-26 08:59:36 +02:00
README.md total photo count for zip files 2022-10-26 08:59:36 +02: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