You are here

public function TraceableEventDispatcher::addListener in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php \Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher::addListener()

Adds an event listener that listens on the specified events.

Parameters

string $eventName The event to listen on:

callable $listener The listener:

int $priority The higher this value, the earlier an event: listener will be triggered in the chain (defaults to 0)

Overrides EventDispatcherInterface::addListener

File

vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php, line 55

Class

TraceableEventDispatcher
Collects some data about event listeners.

Namespace

Symfony\Component\EventDispatcher\Debug

Code

public function addListener($eventName, $listener, $priority = 0) {
  $this->dispatcher
    ->addListener($eventName, $listener, $priority);
}