SettingsManager.php in Drupal driver for SQL Server and SQL Azure 8.2
File
drivers/lib/Drupal/Driver/Database/sqlsrv/Component/SettingsManager.php
View source
<?php
namespace Drupal\Driver\Database\sqlsrv\Component;
class SettingsManager {
private $settings = array();
protected function &CallMethod($method, array $options = array(), array $args = array(), $default = null) {
if (empty($args)) {
if (!isset($this->settings[$method])) {
$this->settings[$method] = $default;
}
return $this->settings[$method];
}
$value = reset($args);
if (!empty($options)) {
if (!in_array($value, $options)) {
throw new \Exception("Invalid value");
}
}
$this->settings[$method] = $value;
return $this->settings[$method];
}
public function getSettings() {
return $this->settings;
}
}