public function DatabaseLockBackend::__construct in Drupal 10
Same name in this branch
- 10 core/lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::__construct()
- 10 core/lib/Drupal/Core/ProxyClass/Lock/DatabaseLockBackend.php \Drupal\Core\ProxyClass\Lock\DatabaseLockBackend::__construct()
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::__construct()
- 9 core/lib/Drupal/Core/Lock/DatabaseLockBackend.php \Drupal\Core\Lock\DatabaseLockBackend::__construct()
Constructs a new DatabaseLockBackend.
Parameters
\Drupal\Core\Database\Connection $database: The database connection.
File
- core/
lib/ Drupal/ Core/ Lock/ DatabaseLockBackend.php, line 35
Class
- DatabaseLockBackend
- Defines the database lock backend. This is the default backend in Drupal.
Namespace
Drupal\Core\LockCode
public function __construct(Connection $database) {
// __destruct() is causing problems with garbage collections, register a
// shutdown function instead.
drupal_register_shutdown_function([
$this,
'releaseAll',
]);
$this->database = $database;
}