404

[ Avaa Bypassed ]




Upload:

Command:

elspacio@3.147.6.58: ~ $
<?php

namespace Doctrine\DBAL\Driver\SQLite3;

use Doctrine\DBAL\Driver\AbstractSQLiteDriver;
use Doctrine\DBAL\Driver\API\SQLite\UserDefinedFunctions;
use SensitiveParameter;
use SQLite3;

final class Driver extends AbstractSQLiteDriver
{
    /**
     * {@inheritdoc}
     */
    public function connect(
        #[SensitiveParameter]
        array $params
    ): Connection {
        $isMemory = (bool) ($params['memory'] ?? false);

        if (isset($params['path'])) {
            if ($isMemory) {
                throw new Exception(
                    'Invalid connection settings: specifying both parameters "path" and "memory" is ambiguous.',
                );
            }

            $filename = $params['path'];
        } elseif ($isMemory) {
            $filename = ':memory:';
        } else {
            throw new Exception(
                'Invalid connection settings: specify either the "path" or the "memory" parameter for SQLite3.',
            );
        }

        try {
            $connection = new SQLite3($filename);
        } catch (\Exception $e) {
            throw Exception::new($e);
        }

        $connection->enableExceptions(true);

        UserDefinedFunctions::register([$connection, 'createFunction']);

        return new Connection($connection);
    }
}

Filemanager

Name Type Size Permission Actions
Connection.php File 2.38 KB 0644
Driver.php File 1.27 KB 0644
Exception.php File 359 B 0644
Result.php File 1.87 KB 0644
Statement.php File 3.7 KB 0644