Shawn Bandy b87567463c Completed code and initial testing for batch resumption 12 years ago
..
Debug b87567463c Completed code and initial testing for batch resumption 12 years ago
Tests b87567463c Completed code and initial testing for batch resumption 12 years ago
.gitignore b87567463c Completed code and initial testing for batch resumption 12 years ago
CHANGELOG.md b87567463c Completed code and initial testing for batch resumption 12 years ago
ContainerAwareEventDispatcher.php b87567463c Completed code and initial testing for batch resumption 12 years ago
Event.php b87567463c Completed code and initial testing for batch resumption 12 years ago
EventDispatcher.php b87567463c Completed code and initial testing for batch resumption 12 years ago
EventDispatcherInterface.php b87567463c Completed code and initial testing for batch resumption 12 years ago
EventSubscriberInterface.php b87567463c Completed code and initial testing for batch resumption 12 years ago
GenericEvent.php b87567463c Completed code and initial testing for batch resumption 12 years ago
ImmutableEventDispatcher.php b87567463c Completed code and initial testing for batch resumption 12 years ago
LICENSE b87567463c Completed code and initial testing for batch resumption 12 years ago
README.md b87567463c Completed code and initial testing for batch resumption 12 years ago
composer.json b87567463c Completed code and initial testing for batch resumption 12 years ago
phpunit.xml.dist b87567463c Completed code and initial testing for batch resumption 12 years ago

README.md

EventDispatcher Component

EventDispatcher implements a lightweight version of the Observer design pattern.

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