Jelix 1.8.14-pre

ListenerProvider
in package
implements ListenerProviderInterface

Tags

Interfaces, Classes and Traits

ListenerProviderInterface

Table of Contents

$compilerData  : mixed
$config  : mixed
$hashListened  : array<string|int, array<string|int, EventListener>>
hash table for event listened.
$listenersList  : array<string|int, mixed>|null
List of listeners for each event key = event name, value = array('moduleName', 'listener class name', 'listener name if class not autoloadable')
$listenersSingleton  : array<string|int, array<string|int, EventListener>>
because a listener can listen several events, we should create only one instance of a listener for performance, and $hashListened will contain only reference to this listener.
__construct()  : mixed
getListenersForEvent()  : iterable<string|int, mixed>
loadListenersFor()  : mixed
construct the list of all listeners corresponding to an event.

Properties

$compilerData

protected mixed $compilerData = array('jEventCompiler', 'events/jEventCompiler.class.php', 'events.xml', 'events.php')
Tags

$hashListened

hash table for event listened.

protected array<string|int, array<string|int, EventListener>> $hashListened = array()

$hashListened['eventName'] = array of events (by reference).

Tags

$listenersList

List of listeners for each event key = event name, value = array('moduleName', 'listener class name', 'listener name if class not autoloadable')

protected array<string|int, mixed>|null $listenersList = null
Tags

$listenersSingleton

because a listener can listen several events, we should create only one instance of a listener for performance, and $hashListened will contain only reference to this listener.

protected array<string|int, array<string|int, EventListener>> $listenersSingleton = array()
Tags

Methods

__construct()

public __construct(object $jelixConfig) : mixed
Parameters
$jelixConfig : object
Tags
Return values
mixed

getListenersForEvent()

public getListenersForEvent(object $event) : iterable<string|int, mixed>
Parameters
$event : object
Tags
Return values
iterable<string|int, mixed>

loadListenersFor()

construct the list of all listeners corresponding to an event.

protected loadListenersFor(string $eventName) : mixed
Parameters
$eventName : string

the event name we want the listeners for

Tags
Return values
mixed

Search results