Database::ignoreTarget

7 database.inc public static Database::ignoreTarget($key, $target)
8 Database.php public static Database::ignoreTarget($key, $target)

Instructs the system to temporarily ignore a given key/target.

At times we need to temporarily disable slave queries. To do so, call this method with the database key and the target to disable. That database key will then always fall back to 'default' for that key, even if it's defined.

Parameters

$key: The database connection key.

$target: The target of the specified key to ignore.

2 calls to Database::ignoreTarget()

File

includes/database/database.inc, line 1715
Core systems for the database layer.

Code

public static function ignoreTarget($key, $target) {
  self::$ignoreTargets[$key][$target] = TRUE;
}
Login or register to post comments