You are here

protected function SettingsManager::CallMethod in Drupal driver for SQL Server and SQL Azure 8.2

Store or retrieve a setting.

Parameters

string $method:

array $args:

Return value

mixed

26 calls to SettingsManager::CallMethod()
EngineVersion::Edition in drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme/EngineVersion.php
EngineVersion::EngineEdition in drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme/EngineVersion.php
EngineVersion::Level in drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme/EngineVersion.php
EngineVersion::Version in drivers/lib/Drupal/Driver/Database/sqlsrv/Scheme/EngineVersion.php
ExtensionData::ClassName in drivers/lib/Drupal/Driver/Database/sqlsrv/ExtensionData.php

... See full list

File

drivers/lib/Drupal/Driver/Database/sqlsrv/Component/SettingsManager.php, line 21

Class

SettingsManager

Namespace

Drupal\Driver\Database\sqlsrv\Component

Code

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];
}