Symfony\Component\EventDispatcher\EventDispatcherInterface::dispatch
Dispatches an event to all registered listeners.
Signature
public function dispatch(string
$eventName,
[Event
$event = null] )
Parameters
$eventName
—
string
- The name of the event to dispatch. The name of
the event is the name of the method that is
invoked on listeners.
$event
—
Symfony\Component\EventDispatcher\Event
- The event to pass to the event handlers/listeners.
If not supplied, an empty Event instance is created.
Returns
- Event