You are here

public function TraceableEventDispatcher::hasListeners 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::hasListeners()

Checks whether an event has any registered listeners.

Parameters

string $eventName The name of the event:

Return value

bool true if the specified event has any listeners, false otherwise

Overrides EventDispatcherInterface::hasListeners

File

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

Class

TraceableEventDispatcher
Collects some data about event listeners.

Namespace

Symfony\Component\EventDispatcher\Debug

Code

public function hasListeners($eventName = null) {
  return $this->dispatcher
    ->hasListeners($eventName);
}