This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/EventDispatcher
Fabien Potencier 05815adb22 Merge branch '2.5'
* 2.5:
  added missing use statements
  added missing use statement
  added missing use statement
  fixed CS
  [Process] fixed some volatile tests
  [HttpKernel] fixed a volatile test
  [HttpFoundation] fixed some volatile tests
  [Tests] PHPUnit Optimizations
  Use getPathname() instead of string casting to get BinaryFileReponse file path

Conflicts:
	src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php
	src/Symfony/Bundle/TwigBundle/Tests/DependencyInjection/Fixtures/php/full.php
	src/Symfony/Component/Debug/Tests/Exception/FlattenExceptionTest.php
	src/Symfony/Component/HttpFoundation/Tests/BinaryFileResponseTest.php
	src/Symfony/Component/Process/Process.php
	src/Symfony/Component/Stopwatch/Stopwatch.php
	src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php
	src/Symfony/Component/Validator/Tests/Constraints/GreaterThanOrEqualValidatorTest.php
	src/Symfony/Component/Yaml/Parser.php
	src/Symfony/Component/Yaml/Tests/InlineTest.php
2014-09-22 13:59:59 +02:00
..
Debug Merge branch '2.4' into 2.5 2014-09-22 11:14:18 +02:00
DependencyInjection Merge branch '2.4' 2014-01-06 08:29:39 +01:00
Tests Merge branch '2.4' into 2.5 2014-09-22 11:14:18 +02:00
.gitignore Added missing files .gitignore 2013-07-21 14:12:18 +02:00
CHANGELOG.md [EventDispatcher] Added TraceableEventDispatcher from HttpKernel 2013-12-28 20:38:07 +01:00
composer.json updated version to 2.6 2014-05-23 16:36:49 +02:00
ContainerAwareEventDispatcher.php made {@inheritdoc} annotations consistent across the board 2014-04-16 09:04:20 +02:00
Event.php Merge branch '2.3' into 2.4 2014-04-16 12:34:31 +02:00
EventDispatcher.php Merge branch '2.3' into 2.4 2014-07-28 15:13:16 +02:00
EventDispatcherInterface.php fixed types in phpdocs 2014-04-16 12:30:19 +02:00
EventSubscriberInterface.php fixed CS 2012-07-09 14:54:20 +02:00
GenericEvent.php fixed types in phpdocs 2014-04-16 12:30:19 +02:00
ImmutableEventDispatcher.php [EventDispatcher] Rename UnmodifiableEventDispatcher to ImmutableEventDispatcher 2012-07-20 01:18:14 +02:00
LICENSE update year on licenses 2014-01-07 08:19:25 -05:00
phpunit.xml.dist removed defaults from PHPUnit configuration 2014-07-07 12:13:42 +02:00
README.md [EventDispatcher] tweaked README 2013-11-30 10:35:04 +01:00

EventDispatcher Component

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