final public static function Database::isActiveConnection

Determines if there is an active connection.

Note that this method will return FALSE if no connection has been established yet, even if one could be.

Return value

TRUE if there is at least one database connection established, FALSE otherwise.

1 call to Database::isActiveConnection()
install_database_errors in drupal/core/includes/install.core.inc
Checks a database connection and returns any errors.

File

drupal/core/lib/Drupal/Core/Database/Database.php, line 186
Definition of Drupal\Core\Database\Database

Class

Database
Primary front-controller for the database system.

Namespace

Drupal\Core\Database

Code

public static final function isActiveConnection() {
  return !empty(self::$activeKey) && !empty(self::$connections) && !empty(self::$connections[self::$activeKey]);
}