public function ImmutableEventDispatcher::addListener in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php \Symfony\Component\EventDispatcher\ImmutableEventDispatcher::addListener()
Adds an event listener that listens on the specified events.
Parameters
string $eventName The event to listen on:
callable $listener The listener:
int $priority The higher this value, the earlier an event: listener will be triggered in the chain (defaults to 0)
Overrides EventDispatcherInterface::addListener
File
- vendor/
symfony/ event-dispatcher/ ImmutableEventDispatcher.php, line 49
Class
- ImmutableEventDispatcher
- A read-only proxy for an event dispatcher.
Namespace
Symfony\Component\EventDispatcherCode
public function addListener($eventName, $listener, $priority = 0) {
throw new \BadMethodCallException('Unmodifiable event dispatchers must not be modified.');
}