You are here

public function ImmutableEventDispatcher::dispatch in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php \Symfony\Component\EventDispatcher\ImmutableEventDispatcher::dispatch()

Dispatches an event to all registered listeners.

Parameters

string $eventName The name of the event to dispatch. The name of: the event is the name of the method that is invoked on listeners.

Event $event The event to pass to the event handlers/listeners.: If not supplied, an empty Event instance is created.

Return value

Event

Overrides EventDispatcherInterface::dispatch

File

vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php, line 41

Class

ImmutableEventDispatcher
A read-only proxy for an event dispatcher.

Namespace

Symfony\Component\EventDispatcher

Code

public function dispatch($eventName, Event $event = null) {
  return $this->dispatcher
    ->dispatch($eventName, $event);
}