You are here

private function TraceableEventDispatcher::preProcess 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::preProcess()
1 call to TraceableEventDispatcher::preProcess()
TraceableEventDispatcher::dispatch in vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php
Dispatches an event to all registered listeners.

File

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

Class

TraceableEventDispatcher
Collects some data about event listeners.

Namespace

Symfony\Component\EventDispatcher\Debug

Code

private function preProcess($eventName) {
  foreach ($this->dispatcher
    ->getListeners($eventName) as $listener) {
    $this->dispatcher
      ->removeListener($eventName, $listener);
    $info = $this
      ->getListenerInfo($listener, $eventName);
    $name = isset($info['class']) ? $info['class'] : $info['type'];
    $wrappedListener = new WrappedListener($listener, $name, $this->stopwatch, $this);
    $this->wrappedListeners[$eventName][] = $wrappedListener;
    $this->dispatcher
      ->addListener($eventName, $wrappedListener);
  }
}