README.md
1EventDispatcher Component
2=========================
3
4The Symfony EventDispatcher component implements the Mediator pattern in a
5simple and effective way to make your projects truly extensible.
6
7```php
8use Symfony\Component\EventDispatcher\EventDispatcher;
9use Symfony\Component\EventDispatcher\Event;
10
11$dispatcher = new EventDispatcher();
12
13$dispatcher->addListener('event_name', function (Event $event) {
14 // ...
15});
16
17$dispatcher->dispatch('event_name');
18```
19
20Resources
21---------
22
23You can run the unit tests with the following command:
24
25 $ cd path/to/Symfony/Component/EventDispatcher/
26 $ composer install
27 $ phpunit
28