Interface EventPropagatorInterface
Generic event propagator.
The event propagator is used to dispatch an event to the attached event
dispatcher.
When propagating an event, one can pass an array of suffixes that will get
appended to the event name in a loop.
Methods summary
public
Symfony\Component\EventDispatcher\Event
|
#
propagate( string $eventName, Symfony\Component\EventDispatcher\Event $event = null, string[] $suffixes = array() )
Propagate an event to the defined event dispatcher.
Propagate an event to the defined event dispatcher.
The given suffixes will get appended to the event name and the resulting
event name will get fired.
For each round of firing, the last element from the suffixes get's dropped
and the event fired again.
The loop stops as soon as the passed event has isPropagationStopped() ===
true
Example: Eventname: dc-general.some.event Suffixes: array('param1', 'param2')
Resulting Events: 1. dc-general.some.event[param1][param2] 2.
dc-general.some.event[param1] 3. dc-general.some.event
Parameters
- $eventName
string $eventName The event name of the event to propagate.
- $event
Symfony\Component\EventDispatcher\Event $event The Event to propagate (optional).
- $suffixes
string[] $suffixes Suffixes to attach to the event.
Returns
Symfony\Component\EventDispatcher\Event
|
public
Symfony\Component\EventDispatcher\Event
|
#
propagateExact( string $eventName, Symfony\Component\EventDispatcher\Event $event, string[] $suffixes = array() )
Propagate an event to the defined event dispatcher.
Propagate an event to the defined event dispatcher.
The given suffixes will get appended to the event name and the resulting
event name will get fired.
Parameters
- $eventName
string $eventName The event name of the event to propagate.
- $event
Symfony\Component\EventDispatcher\Event $event The Event to propagate.
- $suffixes
string[] $suffixes Suffixes to attach to the event.
Returns
Symfony\Component\EventDispatcher\Event
|