Event
class Event
Methods
__construct(string $name)
Event constructor.
addListener(string|callable $handler)
Adds a listener to the event.
setListener(string|callable $handler)
Sets a single listener for the event, replacing any existing listeners.
dispatch(mixed ...$arguments)
Dispatches the event to all registered listeners.
Details
at line 12
__construct(string $name)
Event constructor.
at line 20
addListener(string|callable $handler)
Adds a listener to the event.
at line 33
setListener(string|callable $handler)
Sets a single listener for the event, replacing any existing listeners.
at line 45
dispatch(mixed ...$arguments)
Dispatches the event to all registered listeners.