You are here

class Database in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Database/Database.php \Drupal\Core\Database\Database

Hierarchy

Expanded class hierarchy of Database

1 file declares its use of Database
KeyValueDatabaseFactory.php in lib/Drupal/Core/KeyValueStore/KeyValueDatabaseFactory.php
Contains \Drupal\Core\KeyValueStore\KeyValueDatabaseFactory.

File

lib/Drupal/Core/Database/Database.php, line 12
Contains \Drupal\Core\Database\Database.

Namespace

Drupal\Core\Database
View source
class Database {
  public static final function startLog($logging_key, $key = 'default') {
    return BaseDatabase::startLog($logging_key, $key);
  }
  public static final function getLog($logging_key, $key = 'default') {
    return BaseDatabase::getLog($logging_key, $key);
  }

  /**
   * @return \Drupal\Core\Database\Connection
   */
  public static final function getConnection($target = 'default', $key = NULL) {
    return new Connection(BaseDatabase::getConnection($target, $key));
  }
  public static final function isActiveConnection() {
    return BaseDatabase::isActiveConnection();
  }
  public static final function setActiveConnection($key = 'default') {
    return BaseDatabase::setActiveConnection($key);
  }
  public static final function parseConnectionInfo(array $info) {
    BaseDatabase::parseConnectionInfo();
  }
  public static final function addConnectionInfo($key, $target, array $info) {
    BaseDatabase::addConnectionInfo($key, $target, $info);
  }
  public static final function getConnectionInfo($key = 'default') {
    return BaseDatabase::getConnectionInfo($key);
  }
  public static final function getAllConnectionInfo() {
    throw new \Exception('not available/implemented in d7');
  }
  public static final function setMultipleConnectionInfo(array $databases) {
    throw new \Exception('not available/implemented yet in d7');
  }
  public static final function renameConnection($old_key, $new_key) {
    return BaseDatabase::getConnectionInfo($old_key, $new_key);
  }
  public static final function removeConnection($key) {
    return BaseDatabase::removeConnection($key);
  }
  protected static final function openConnection($key, $target) {
    throw new \Exception('not available/implemented yet in d7');
  }
  public static function closeConnection($target = NULL, $key = NULL) {
    throw new \Exception('not available/implemented yet in d7');
  }
  public static function ignoreTarget($key, $target) {
    BaseDatabase::ignoreTarget($key, $target);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Database::addConnectionInfo final public static function
Database::closeConnection public static function
Database::getAllConnectionInfo final public static function
Database::getConnection final public static function
Database::getConnectionInfo final public static function
Database::getLog final public static function
Database::ignoreTarget public static function
Database::isActiveConnection final public static function
Database::openConnection final protected static function
Database::parseConnectionInfo final public static function
Database::removeConnection final public static function
Database::renameConnection final public static function
Database::setActiveConnection final public static function
Database::setMultipleConnectionInfo final public static function
Database::startLog final public static function