getAttribute(PDO::ATTR_DRIVER_NAME); self::$mode = match ($driver) { 'pgsql' => Mode::PgSQL, 'sqlite' => Mode::SQLite, default => throw new DocumentException( "Unsupported driver $driver: this library currently supports PostgreSQL and SQLite") }; } } return self::$_pdo; } public static function resetPDO(): void { self::$_pdo = null; } }