929f1d9213
* 2.7: Use PHPUnit ini_set wrapper in tests [Process] Added a test skip check for Windows [Process] Removed unused variable assignment Fixes various phpdoc and coding standards. Fixes Issue #13184 - incremental output getters now return empty strings Updated copyright to 2015 Updated copyright to 2015 Updated copyright to 2015 [VarDumper] increase debug.max_items to 2500 [Debug] Update exception messages. use value of DIRECTORY_SEPARATOR to detect Windows force ExpressionLanguage version >= 2.6 [Debug] fixes ClassNotFoundFatalErrorHandler to correctly handle class not found errors with Symfony ClassLoader component autoloaders. Clarify a comment. use PHP_WINDOWS_VERSION_BUILD to detect Windows Check if a field type_class is defined before using it. Currently if you want to use inline bootstrap form rendering, this is usually enough: Add deprecation warning to LegacyPdoSessionHandler Conflicts: src/Symfony/Bridge/Monolog/Logger.php src/Symfony/Bridge/Swiftmailer/LICENSE src/Symfony/Component/Debug/composer.json src/Symfony/Component/HttpFoundation/Tests/Session/Storage/NativeSessionStorageTest.php |
||
---|---|---|
.. | ||
Debug | ||
DependencyInjection | ||
Tests | ||
.gitignore | ||
CHANGELOG.md | ||
composer.json | ||
ContainerAwareEventDispatcher.php | ||
Event.php | ||
EventDispatcher.php | ||
EventDispatcherInterface.php | ||
EventSubscriberInterface.php | ||
GenericEvent.php | ||
ImmutableEventDispatcher.php | ||
LICENSE | ||
phpunit.xml.dist | ||
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.phar install
$ phpunit