You are here

Database.php in Service Container 7

Same filename and directory in other branches
  1. 7.2 lib/Drupal/Core/Database/Database.php

File

lib/Drupal/Core/Database/Database.php
View source
<?php

/**
 * @file
 * Contains \Drupal\Core\Database\Database.
 */
namespace Drupal\Core\Database;

use Database as BaseDatabase;
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);
  }

}

Classes

Namesort descending Description
Database