The trait ByTIC\EventDispatcher\Li...istenForInterfacesTrait requires the property $listeners which is not provided by ByTIC\EventDispatcher\Li...oviders\DefaultProvider.
Loading history...
12
13
/**
14
* @inheritDoc
15
*/
16
public function getListenersForEvent(object $event): iterable
17
{
18
yield from parent::getListenersForEvent($event);
19
20
if (method_exists($event, 'eventName')) {
21
yield from $this->getListenersForEventName($event->eventName());
22
} elseif (method_exists($event, 'getName')) {
23
yield from $this->getListenersForEventName($event->getName());
24
}
25
yield from $this->getListenersForEventInterfaces($event);
26
}
27
28
/**
29
* @param string $eventName
30
* @param callable|string $listener
31
* @param int $priority
32
*/
33
public function addListener(string $eventName, $listener, int $priority = ListenerPriority::NORMAL): void
34
{
35
$this->attach($listener, $priority, $eventName);
36
}
37
38
/**
39
* @param string $eventName
40
* @param callable|string $listener
41
* @param int $priority
42
*/
43
public function listen(string $eventName, $listener, int $priority = ListenerPriority::NORMAL): void