dflaven 95497f51c5 Exclude non-needed folders from the build. 8 anos atrás
..
Debug fddde8b17d Added Silex framework 9 anos atrás
DependencyInjection fddde8b17d Added Silex framework 9 anos atrás
Tests fddde8b17d Added Silex framework 9 anos atrás
.gitignore fddde8b17d Added Silex framework 9 anos atrás
CHANGELOG.md fddde8b17d Added Silex framework 9 anos atrás
ContainerAwareEventDispatcher.php fddde8b17d Added Silex framework 9 anos atrás
Event.php fddde8b17d Added Silex framework 9 anos atrás
EventDispatcher.php fddde8b17d Added Silex framework 9 anos atrás
EventDispatcherInterface.php fddde8b17d Added Silex framework 9 anos atrás
EventSubscriberInterface.php fddde8b17d Added Silex framework 9 anos atrás
GenericEvent.php fddde8b17d Added Silex framework 9 anos atrás
ImmutableEventDispatcher.php fddde8b17d Added Silex framework 9 anos atrás
LICENSE fddde8b17d Added Silex framework 9 anos atrás
README.md fddde8b17d Added Silex framework 9 anos atrás
composer.json fddde8b17d Added Silex framework 9 anos atrás
exclude.txt 95497f51c5 Exclude non-needed folders from the build. 8 anos atrás
phpunit.xml.dist fddde8b17d Added Silex framework 9 anos atrás

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