EventDispatcher Component
The EventDispatcher component provides tools that allow your application components to communicate with each other by dispatching events and listening to them.
The EventDispatcher component provides tools that allow your application components to communicate with each other by dispatching events and listening to them.
The "originator" is the object and/or file and line number of the code that
called EventDispatcher::dispatch
This could be useful for debugging although my original motivation for this is that in my project I want the listener to be able to find out about objects that it otherwise wouldn't know about, because the objects are created after the listener is attached.
In my specific example, I am creating for our proprietary MVC framework a debug toolbar much like Symfony's and I need a listener that is called when a view is rendered and I need that listener to be able to find out the view object that dispatched the event. This allows me to do that without subclassing Event
.
Hi,
Today I found that the actual method's case of event listener was wrong, when no method was specified, for example, event name: kernel.controller_arguments
, expected default method name: onkernelControllerArguments
, actual method called: onKernelControllerarguments
, but actually it's ok, php is case-insenstive for function call.
ps, a service.yaml example:
services:
my_kernel_envent_listeners:
class: App\EventListener\KernelListener
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }
- { name: kernel.event_listener, event: kernel.controller_arguments } # no `method` at this tag
By removing the check if $listeners has any listeners, we could reliably extend the protected callListeners(). This would open the door for implementing the PSR-14 Psr\EventDispatcher\ListenerProviderInterface.
Add missing doc blocks to the EventDispatcherInterface interface.
Necessary since the subclasses which are using this contract are using the * {@inheritdoc}
tag.
EventSubscriberInterface::getSubscribedEvents should not be static - every call to this method seems to be instance-based.
Problem: Development of a "dynamic registration"-Subscriber based on Constructor-Params impossible.
Solution: Change call-type of getSubscribedEvents to instance.
Side-Effects: None known - all calls are instance-calls.
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.1.8...v6.1.9)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.16...v6.0.17)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.4.16...v5.4.17)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.2.1...v6.2.2)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.2.0-RC2...v6.2.0)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.2.0-BETA3...v6.2.0-RC1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.2.0-BETA2...v6.2.0-BETA3)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.1.6...v6.2.0-BETA1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v4.4.43...v4.4.44)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.1.0-RC1...v6.1.0)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.8...v6.0.9)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.4.8...v5.4.9)
Changelog (https://github.com/symfony/event-dispatcher/compare/v4.4.41...v4.4.42)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.1.0-BETA2...v6.1.0-RC1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.1.0-BETA1...v6.1.0-BETA2)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.7...v6.1.0-BETA1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.2...v6.0.3)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.4.2...v5.4.3)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.3.13...v5.3.14)
Changelog (https://github.com/symfony/event-dispatcher/compare/v4.4.36...v4.4.37)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.1...v6.0.2)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.0...v6.0.1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.0-RC1...v6.0.0)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.4.0-RC1...v5.4.0)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.0-BETA3...v6.0.0-RC1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.4.0-BETA3...v5.4.0-RC1)
Changelog (https://github.com/symfony/event-dispatcher/compare/v5.3.10...v5.3.11)
Changelog (https://github.com/symfony/event-dispatcher/compare/v4.4.33...v4.4.34)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.0-BETA2...v6.0.0-BETA3)
Changelog (https://github.com/symfony/event-dispatcher/compare/v6.0.0-BETA2...v5.4.0-BETA3)
CLIFramework CLIFramework is a command-line application framework, for building flexiable, simple command-line applications. Commands and Subcommands
Pecan Event-driven, non-blocking shell for ReactPHP. Pecan (/pɪˈkɑːn/) provides a non-blocking alternative to the shell provided in the Symfony Consol
zend-authentication Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-authentication. The Zend\Authentication component pro
VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t
Illuminate Database The Illuminate Database component is a full database toolkit for PHP, providing an expressive query builder, ActiveRecord style OR
zend-serializer Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-serializer. zend-serializer provides an adapter-based int
DependencyInjection Component The DependencyInjection component allows you to standardize and centralize the way objects are constructed in your appli
zend-servicemanager Repository abandoned 2019-12-31 This repository has moved to laminas/laminas-servicemanager. Master: Develop: The Service Locator
html2text html2text is a very simple script that uses DOM methods to convert HTML into a format similar to what would be rendered by a browser - perfe
Route This package is compliant with PSR-1, PSR-2, PSR-4, PSR-7, PSR-11 and PSR-15. If you notice compliance oversights, please send a patch via pull
HttpClient component The HttpClient component provides powerful methods to fetch HTTP resources synchronously or asynchronously. Resources Documentati
Mailer Component The Mailer component helps sending emails. Getting Started $ composer require symfony/mailer use Symfony\Component\Mailer\Transport;
VarDumper Component The VarDumper component provides mechanisms for walking through any arbitrary PHP variable. It provides a better dump() function t
Asset Component The Asset component manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files. Res
HttpFoundation Component The HttpFoundation component defines an object-oriented layer for the HTTP specification. Resources Documentation Contributin
Clockwork is a development tool for PHP available right in your browser. Clockwork gives you an insight into your application runtime - including requ
Torch - Using Laravel's Illuminate Components Independently Torch is a project to provide instructions and examples for using Illuminate components as
A component-centric backend communication layer for Alpine.js. Installation Install using the following command: composer require radio/radio Install
Laravel Livewire Routes Laravel Livewire full page component routing. This package allows you to specify routes directly inside your full page Livewir
Airwire A lightweight full-stack component layer that doesn't dictate your front-end framework Demo Introduction Airwire is a thin layer between your