![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/medad.corals.io/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/SQLSrv/ |
<?php namespace Doctrine\DBAL\Driver\SQLSrv; use Doctrine\DBAL\Driver\AbstractSQLServerDriver; use Doctrine\DBAL\Driver\AbstractSQLServerDriver\Exception\PortWithoutHost; use Doctrine\Deprecations\Deprecation; /** * Driver for ext/sqlsrv. */ class Driver extends AbstractSQLServerDriver { /** * {@inheritdoc} */ public function connect(array $params, $username = null, $password = null, array $driverOptions = []) { $serverName = ''; if (isset($params['host'])) { $serverName = $params['host']; if (isset($params['port'])) { $serverName .= ',' . $params['port']; } } elseif (isset($params['port'])) { throw PortWithoutHost::new(); } if (isset($params['dbname'])) { $driverOptions['Database'] = $params['dbname']; } if (isset($params['charset'])) { $driverOptions['CharacterSet'] = $params['charset']; } if ($username !== null) { $driverOptions['UID'] = $username; } if ($password !== null) { $driverOptions['PWD'] = $password; } if (! isset($driverOptions['ReturnDatesAsStrings'])) { $driverOptions['ReturnDatesAsStrings'] = 1; } return new Connection($serverName, $driverOptions); } /** * {@inheritdoc} * * @deprecated */ public function getName() { Deprecation::trigger( 'doctrine/dbal', 'https://github.com/doctrine/dbal/issues/3580', 'Driver::getName() is deprecated' ); return 'sqlsrv'; } }