Events
in package
Class Events.
Table of Contents
Properties
- $listeners : array<string, callable>
Methods
- isListening() : bool
- listen() : void
- remove() : void
- trigger() : void
Properties
$listeners
protected
static array<string, callable>
$listeners
= []
Methods
isListening()
public
static isListening(string $name) : bool
Parameters
- $name : string
Attributes
- #[Pure]
Return values
boollisten()
public
static listen(string $name, callable $callback) : void
Parameters
- $name : string
- $callback : callable
remove()
public
static remove(string $name) : void
Parameters
- $name : string
trigger()
public
static trigger(string $name, mixed ...$arguments) : void
Parameters
- $name : string
- $arguments : mixed