public function TraceableEventDispatcher::preListenerCall

This is a private method.

This method is public because it is used in a closure. Whenever Symfony will require PHP 5.4, this could be changed to a proper private method.

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Debug/TraceableEventDispatcher.php, line 234

Class

TraceableEventDispatcher
Collects some data about event listeners.

Namespace

Symfony\Component\HttpKernel\Debug

Code

public function preListenerCall($eventName, $listener) {

  // is it the first called listener?
  if (isset($this->firstCalledEvent[$eventName])) {
    $this->firstCalledEvent[$eventName]
      ->stop();
    unset($this->firstCalledEvent[$eventName]);
  }
  $info = $this
    ->getListenerInfo($listener, $eventName);
  if (null !== $this->logger) {
    $this->logger
      ->debug(sprintf('Notified event "%s" to listener "%s".', $eventName, $info['pretty']));
  }
  $this->called[$eventName . '.' . $info['pretty']] = $info;
  return $this->stopwatch
    ->start(isset($info['class']) ? $info['class'] : $info['type'], 'event_listener');
}