$instances
$instances : array<mixed,\phpDocumentor\Event\Dispatcher>
Event Dispatching class.
This class provides a bridge to the Symfony2 EventDispatcher. At current this is provided by inheritance but future iterations should solve this by making it an adapter pattern.
The class is implemented as (mockable) Singleton as this was the best solution to make the functionality available in every class of the project.
$instances : array<mixed,\phpDocumentor\Event\Dispatcher>
getInstance(string $name = 'default') : \phpDocumentor\Event\Dispatcher
Returns a named instance of the Event Dispatcher.
string | $name |
setInstance(string $name, \phpDocumentor\Event\Dispatcher $instance) : void
Sets a names instance of the Event Dispatcher.
string | $name | |
\phpDocumentor\Event\Dispatcher | $instance |
dispatch(string $eventName, \Symfony\Component\EventDispatcher\Event $event = null) : \phpDocumentor\Event\EventAbstract
Dispatches an event.
Please note that the typehint of this method indicates a Symfony Event and this DocBlock a phpDocumentor event. This is because of inheritance and that the dispatch signature must remain intact.
string | $eventName | |
\Symfony\Component\EventDispatcher\Event | $event |