Daniel ab1334c0cf the whole shebang пре 10 година
..
Debug ab1334c0cf the whole shebang пре 10 година
Tests ab1334c0cf the whole shebang пре 10 година
.gitignore ab1334c0cf the whole shebang пре 10 година
CHANGELOG.md ab1334c0cf the whole shebang пре 10 година
ContainerAwareEventDispatcher.php ab1334c0cf the whole shebang пре 10 година
Event.php ab1334c0cf the whole shebang пре 10 година
EventDispatcher.php ab1334c0cf the whole shebang пре 10 година
EventDispatcherInterface.php ab1334c0cf the whole shebang пре 10 година
EventSubscriberInterface.php ab1334c0cf the whole shebang пре 10 година
GenericEvent.php ab1334c0cf the whole shebang пре 10 година
ImmutableEventDispatcher.php ab1334c0cf the whole shebang пре 10 година
LICENSE ab1334c0cf the whole shebang пре 10 година
README.md ab1334c0cf the whole shebang пре 10 година
composer.json ab1334c0cf the whole shebang пре 10 година
phpunit.xml.dist ab1334c0cf the whole shebang пре 10 година

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