Event
class Event (View source)
Class Event
Methods
__construct()
Event constructor.
static Event
getInstance()
Event constructor.
static void
on(string $event, callable|string $fn, int $priority)
No description
void
listener(string $event, callable|string $fn, int $priority = 0)
Alias to on method
bool
bound(AppEvent $event)
Check whether an event is already recorded at least once.
static void
once(string $event, callable|array|string $fn, int $priority)
No description
array
getEventListeners(string $event_name)
Get the one-time listener for an event
bool|null
emit(AppEvent $event)
Dispatch event
bool|null
dispatch(AppEvent $event)
Dispatch event
static void
off(string $event)
No description
static mixed
__callStatic(string $name, array $arguments)
__callStatic
void
static() $bool dispatch(string|AppEvent $event)
No description
Details
__construct()
Event constructor.
static Event
getInstance()
Event constructor.
static void
on(string $event, callable|string $fn, int $priority)
No description
void
listener(string $event, callable|string $fn, int $priority = 0)
Alias to on method
bool
bound(AppEvent $event)
Check whether an event is already recorded at least once.
static void
once(string $event, callable|array|string $fn, int $priority)
No description
array
getEventListeners(string $event_name)
Get the one-time listener for an event
bool|null
emit(AppEvent $event)
Dispatch event
bool|null
dispatch(AppEvent $event)
Dispatch event
static void
off(string $event)
No description
static mixed
__callStatic(string $name, array $arguments)
__callStatic
void
static() $bool dispatch(string|AppEvent $event)
No description