spqr/vendor/illuminate/database/PDO/SqlServerDriver.php

33 lines
744 B
PHP
Raw Normal View History

2024-11-05 12:10:06 +08:00
<?php
namespace Illuminate\Database\PDO;
use Doctrine\DBAL\Driver\AbstractSQLServerDriver;
class SqlServerDriver extends AbstractSQLServerDriver
{
/**
* Create a new database connection.
*
* @param mixed[] $params
* @param string|null $username
* @param string|null $password
* @param mixed[] $driverOptions
* @return \Illuminate\Database\PDO\SqlServerConnection
*/
public function connect(array $params, $username = null, $password = null, array $driverOptions = [])
{
return new SqlServerConnection(
new Connection($params['pdo'])
);
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'pdo_sqlsrv';
}
}