You are here

public static function DatabaseUtils::GetConfigConstant in Drupal driver for SQL Server and SQL Azure 7.2

Same name and namespace in other branches
  1. 7.3 sqlsrv/utils.inc \DatabaseUtils::GetConfigConstant()

Get the value of a constant string from configuration.

Parameters

mixed $name:

mixed $default:

Return value

mixed

2 calls to DatabaseUtils::GetConfigConstant()
DatabaseConnection_sqlsrv::DefaultTransactionIsolationLevelInStatement in sqlsrv/database.inc
The PDO constants do not matcc the actual isolation names used in SQL.
DatabaseConnection_sqlsrv::__construct in sqlsrv/database.inc
Override of DatabaseConnection::databaseType().

File

sqlsrv/utils.inc, line 107

Class

DatabaseUtils

Code

public static function GetConfigConstant($name, $default) {
  global $conf;

  // Isolation level.
  if (isset($conf[$name])) {
    $level = $conf[$name];
    if ($l = @constant($level)) {
      return $l;
    }
  }
  return $default;
}