You are here

public function TraceableEventDispatcher::__construct in Devel 4.x

Same name and namespace in other branches
  1. 8.3 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::__construct()
  2. 8 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::__construct()
  3. 8.2 webprofiler/src/EventDispatcher/TraceableEventDispatcher.php \Drupal\webprofiler\EventDispatcher\TraceableEventDispatcher::__construct()

Constructs a container aware event dispatcher.

Parameters

\Symfony\Component\DependencyInjection\ContainerInterface $container: The service container.

array $listeners: A nested array of listener definitions keyed by event name and priority. The array is expected to be ordered by priority. A listener definition is an associative array with one of the following key value pairs:

  • callable: A callable listener
  • service: An array of the form [service id, method]

A service entry will be resolved to a callable only just before its invocation.

Overrides ContainerAwareEventDispatcher::__construct

File

webprofiler/src/EventDispatcher/TraceableEventDispatcher.php, line 35

Class

TraceableEventDispatcher
Class TraceableEventDispatcher.

Namespace

Drupal\webprofiler\EventDispatcher

Code

public function __construct(ContainerInterface $container, array $listeners = []) {
  parent::__construct($container, $listeners);
  $this->notCalledListeners = $listeners;
}