25 $this->dispatcher = $dispatcher;
33 return $this->dispatcher->dispatch($eventName, $event);
39 public function addListener($eventName, $listener, $priority = 0)
41 throw new \BadMethodCallException(
'Unmodifiable event dispatchers must not be modified.');
49 throw new \BadMethodCallException(
'Unmodifiable event dispatchers must not be modified.');
57 throw new \BadMethodCallException(
'Unmodifiable event dispatchers must not be modified.');
65 throw new \BadMethodCallException(
'Unmodifiable event dispatchers must not be modified.');
73 return $this->dispatcher->getListeners($eventName);
81 return $this->dispatcher->getListenerPriority($eventName, $listener);
89 return $this->dispatcher->hasListeners($eventName);