%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux host.digitalbabaji.in 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64 User : addictionfreeind ( 1003) PHP Version : 7.2.34 Disable Function : exec,passthru,shell_exec,system Directory : /home/addictionfreeind/www/admin1/vendor/doctrine/dbal/src/Driver/SQLite3/ |
Upload File : |
<?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);
}
}