private function DriverSettings::CheckValid in Drupal driver for SQL Server and SQL Azure 8
Checks for a valid setting in the list of allowed values.
Parameters
mixed $value:
array $allowed:
1 call to DriverSettings::CheckValid()
- DriverSettings::__construct in drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ DriverSettings.php - Construct an instance of DriverSettings.
File
- drivers/
lib/ Drupal/ Driver/ Database/ sqlsrv/ DriverSettings.php, line 59
Class
- DriverSettings
- Global settings for the driver.
Namespace
Drupal\Driver\Database\sqlsrvCode
private function CheckValid($name, $value, array $allowed) {
if (!in_array($value, $allowed)) {
throw new \Exception("Invalid driver setting for {$name}");
}
return $value;
}