public function on(string $event, callable $handler, $once = false): void
    {
        if (self::isSupportedEvent($event)) {
            self::$eventHandlers[$event][] = $handler;

            if (!isset(self::$events[$event])) {
                self::$events[$event] = (bool)$once;
            }
        }
    }