ListenerProvider Class

Aurora\Events Namespace

Interfaces

  • I ListenerProviderInterface

Properties

listeners

Listener array

protected $listeners: array

Methods

listen

Add a listener

Parameters

  • string $event — Event class
  • mixed $handler — Event handler
  • int $priority — Handler priority

Signature

public function listen(string $event, mixed $handler, int $priority = 50)

getListenersForEvent

Get listeners for the given event type

Parameters

  • object $event — An event for which to return the relevant listeners.

Return Value

  • iterable

Signature

public function getListenersForEvent(object $event): iterable

Go to top