public static function register(): bool
    {
        static::init();
        if (!\array_key_exists(static::$backend, static::$invokableClasses)) {
            throw new InvalidArgumentException('Unsupported session backend: '.static::$backend);
        }
        $handler = new static::$invokableClasses[static::$backend];
        \session_save_path(static::$savePath);

        return \session_set_save_handler($handler, true);
    }