You are here

public function DatabaseLockBackend::__construct in Service Container 7

Same name and namespace in other branches
  1. 7.2 lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::__construct()

Constructs a new DatabaseLockBackend.

Parameters

\Drupal\Core\Database\Connection $database: The database connection.

1 method overrides DatabaseLockBackend::__construct()
PersistentDatabaseLockBackend::__construct in lib/Drupal/Core/Lock/PersistentDatabaseLockBackend.php
Constructs a new PersistentDatabaseLockBackend.

File

lib/Drupal/Core/Lock/DatabaseLockBackend.php, line 33
Contains \Drupal\Core\Lock\DatabaseLockBackend.

Class

DatabaseLockBackend
Defines the database lock backend. This is the default backend in Drupal.

Namespace

Drupal\Core\Lock

Code

public function __construct(Connection $database) {

  // __destruct() is causing problems with garbage collections, register a
  // shutdown function instead.
  drupal_register_shutdown_function(array(
    $this,
    'releaseAll',
  ));
  $this->database = $database;
}