Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
add (callable $callback, int $priority) | |
remove (callable $callback) | |
has (callable $callback) | |
getPriority (callable $callback, $default=null) | |
getAll () | |
getIterator () | |
count () | |
Attributs privés | |
$listeners = [] | |
A class containing an inner listeners priority queue that can be iterated multiple times.
add | ( | callable | $callback, |
int | $priority | ||
) |
Add a listener with the given priority only if not already present.
callable | $callback | A callable function acting as an event listener. |
integer | $priority | The listener priority. |
Références $this.
Référencé par Dispatcher\addListener().
count | ( | ) |
Count the number of listeners in the queue.
Références $count.
getAll | ( | ) |
Get all listeners contained in this queue, sorted according to their priority.
Référencé par ListenersPriorityQueue\getIterator().
getIterator | ( | ) |
getPriority | ( | callable | $callback, |
$default = null |
|||
) |
Get the priority of the given listener.
callable | $callback | A callable function acting as an event listener. |
mixed | $default | The default value to return if the listener doesn't exist. |
Références $default, $key, et ListenersPriorityQueue\$listeners.
has | ( | callable | $callback | ) |
Tell if the listener exists in the queue.
callable | $callback | A callable function acting as an event listener. |
Références $key, et ListenersPriorityQueue\$listeners.
remove | ( | callable | $callback | ) |
Remove a listener from the queue.
callable | $callback | A callable function acting as an event listener. |
Références $key, ListenersPriorityQueue\$listeners, et $this.
|
private |