You are here

private function DriverSettings::__construct in Drupal driver for SQL Server and SQL Azure 8

Construct an instance of DriverSettings.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/DriverSettings.php, line 91

Class

DriverSettings
Global settings for the driver.

Namespace

Drupal\Driver\Database\sqlsrv

Code

private function __construct($configuration) {
  $this->_defaultIsolationLevel = $this
    ->CheckValid('default_isolation_level', $configuration['default_isolation_level'], array(
    FALSE,
    PDO::SQLSRV_TXN_READ_UNCOMMITTED,
    PDO::SQLSRV_TXN_READ_COMMITTED,
    PDO::SQLSRV_TXN_REPEATABLE_READ,
    PDO::SQLSRV_TXN_SNAPSHOT,
    PDO::SQLSRV_TXN_SERIALIZABLE,
  ));
  $this->_defaultDirectQueries = $this
    ->CheckValid('default_direct_queries', $configuration['default_direct_queries'], array(
    TRUE,
    FALSE,
  ));
  $this->_defaultStatementCaching = $this
    ->CheckValid('default_statement_caching', $configuration['default_statement_caching'], array(
    TRUE,
    FALSE,
  ));
  $this->_defaultBypassQueryPreprocess = $this
    ->CheckValid('default_bypass_query_preprocess', $configuration['default_bypass_query_preprocess'], array(
    TRUE,
    FALSE,
  ));
  $this->_useNativeUpsert = $this
    ->CheckValid('use_native_upsert', $configuration['use_native_upsert'], array(
    TRUE,
    FALSE,
  ));
  $this->_useNativeMerge = $this
    ->CheckValid('use_native_merge', $configuration['use_native_merge'], array(
    TRUE,
    FALSE,
  ));
  $this->_statementCachingMode = $this
    ->CheckValid('statement_caching_mode', $configuration['statement_caching_mode'], array(
    'disabled',
    'on-demand',
    'always',
  ));
  $this->_appendStackComments = $this
    ->CheckValid('append_stack_comments', $configuration['append_stack_comments'], array(
    TRUE,
    FALSE,
  ));
  $this->_enableTransactions = $this
    ->CheckValid('enable_transactions', $configuration['enable_transactions'], array(
    TRUE,
    FALSE,
  ));
  $this->_monitorDriverStatus = $this
    ->CheckValid('monitor_driver_status', $configuration['monitor_driver_status'], array(
    TRUE,
    FALSE,
  ));
}