$supportedEvents $supportedEvents : array set the supported events, if you need. if it is empty, will allow register any event. Type array
$eventHandlers $eventHandlers : array events and handlers Type array — [ 'event' => callable, // event handler ]
on() on( $event, callable $handler, boolean $once = false) register a event handler Parameters $event callable $handler boolean $once
once() once( $event, callable $handler) register a once event handler Parameters $event callable $handler
fire() fire(string $event, mixed ...$args) : boolean trigger event Parameters string $event mixed $args variadic Returns boolean
isSupportedEvent() isSupportedEvent(string $event) : boolean check $name is a supported event name Parameters string $event Returns boolean