You are here

public function Connection::__construct in Drupal driver for SQL Server and SQL Azure 8.2

Same name in this branch
  1. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/Connection.php \Drupal\Driver\Database\sqlsrv\Connection::__construct()
  2. 8.2 drivers/lib/Drupal/Driver/Database/sqlsrv/PDO/Connection.php \Drupal\Driver\Database\sqlsrv\PDO\Connection::__construct()

File

drivers/lib/Drupal/Driver/Database/sqlsrv/PDO/Connection.php, line 53

Class

Connection

Namespace

Drupal\Driver\Database\sqlsrv\PDO

Code

public function __construct($dsn, $username = null, $password = null, array $driver_options = array(), CacheFactoryInterface $cache = null) {
  if (empty($cache)) {
    $this->cache = new CacheFactoryDefault(md5(implode(':', [
      $dsn,
      $username,
      $password,
    ])));
  }
  else {
    $this->cache = $cache;
  }
  parent::__construct($dsn, $username, $password, $driver_options);
  $this->scheme = new Scheme($this);
}