Documentation

SimpleListenerProvider
in package
implements ListenerProviderInterface Uses ParameterDeriverTrait

Simple ListenerProvider

A basic container of Listeners All listeners are returned that match any of the event's interfaces

Tags
author

Ralf Lang lang@b1-systems.de

category

Horde

copyright

2021 Horde LLC

license

http://www.horde.org/licenses/bsd BSD-3-Clause

Interfaces, Classes and Traits

ListenerProviderInterface

Table of Contents

$listeners  : array<string|int, mixed>
addListener()  : void
Add a listener to the stack of candidates
getListenersForEvent()  : iteratable<string|int, callable>
Filter the list of relevant listeners for this event

Properties

Methods

addListener()

Add a listener to the stack of candidates

public addListener(callable $listener) : void
Parameters
$listener : callable
Return values
void

getListenersForEvent()

Filter the list of relevant listeners for this event

public getListenersForEvent(object $event) : iteratable<string|int, callable>
Parameters
$event : object

An event for which to return the relevant listeners.

Return values
iteratable<string|int, callable>

An iterable (array, iterator, or generator) of callables. Each callable MUST be type-compatible with $event.

Search results