$eventListeners
$eventListeners : array<mixed,\Phug\Event\ListenerQueue>
$eventListeners : array<mixed,\Phug\Event\ListenerQueue>
getEventListeners() : array<mixed,\Phug\Event\ListenerQueue>
Returns current event listeners by event name.
mergeEventListeners(array<mixed,\Phug\Event\ListenerQueue>|\Phug\EventManagerInterface $eventListeners) : boolean
Merge current events listeners with a given list.
array<mixed,\Phug\Event\ListenerQueue>|\Phug\EventManagerInterface | $eventListeners | event listeners by event name |
true on success false on failure
attach(string $event, callable $callback, integer $priority) : boolean
Attaches a listener to an event.
string | $event | the event to attach too |
callable | $callback | a callable function |
integer | $priority | the priority at which the $callback executed |
true on success false on failure
trigger(string|\Phug\EventInterface $event, object|string $target = null, array|object $argv = array()) : mixed
Trigger an event.
Can accept an EventInterface or will create one if not passed
string|\Phug\EventInterface | $event | |
object|string | $target | |
array|object | $argv |