Lines Matching refs:eventName
31 public static function getDefaultMethodName(string $eventName): string argument
33 return 'on' . str_replace(['_', '.'], '', $eventName);
50 …public function addListener(string $eventName, $callable, ?string $class = null, ?string $format =… argument
52 $this->listeners[$eventName][] = [$callable, $class, $format, $interface];
53 unset($this->classListeners[$eventName]);
72 public function hasListeners(string $eventName, string $class, string $format): bool argument
74 if (!isset($this->listeners[$eventName])) {
78 if (!isset($this->classListeners[$eventName][$class][$format])) {
79 …$this->classListeners[$eventName][$class][$format] = $this->initializeListeners($eventName, $class…
82 return !!$this->classListeners[$eventName][$class][$format];
85 public function dispatch(string $eventName, string $class, string $format, Event $event): void argument
87 if (!isset($this->listeners[$eventName])) {
95 if (!isset($this->classListeners[$eventName][$objectClass][$format])) {
96 …$this->classListeners[$eventName][$objectClass][$format] = $this->initializeListeners($eventName, …
99 foreach ($this->classListeners[$eventName][$objectClass][$format] as $listener) {
104 \call_user_func($listener[0], $event, $eventName, $class, $format, $this);
115 …protected function initializeListeners(string $eventName, string $loweredClass, string $format): a… argument
118 foreach ($this->listeners[$eventName] as $listener) {