You are here

private function ConnectionSettings::CheckValid in Drupal driver for SQL Server and SQL Azure 8.2

Checks for a valid setting in the list of allowed values.

Parameters

mixed $value:

array $allowed:

1 call to ConnectionSettings::CheckValid()
ConnectionSettings::__construct in drivers/lib/Drupal/Driver/Database/sqlsrv/ConnectionSettings.php
Construct an instance of DriverSettings.

File

drivers/lib/Drupal/Driver/Database/sqlsrv/ConnectionSettings.php, line 37

Class

ConnectionSettings
Global settings for the driver.

Namespace

Drupal\Driver\Database\sqlsrv

Code

private function CheckValid($name, $value, array $allowed) {
  if (!in_array($value, $allowed)) {
    throw new \Exception("Invalid driver setting for {$name}");
  }
  return $value;
}