You are here

public function MongodbLock::__construct in MongoDB 8

Construct the DatabaseFileUsageBackend.

Parameters

\Drupal\mongodb\MongoCollectionFactory $mongo: The mongodb collection factory.

1 method overrides MongodbLock::__construct()
MongodbLockPersistent::__construct in src/MongodbLockPersistent.php
Construct the DatabaseFileUsageBackend.

File

src/MongodbLock.php, line 27
Contains \Drupal\mongodb\MongodbLock.

Class

MongodbLock

Namespace

Drupal\mongodb

Code

public function __construct(MongoCollectionFactory $mongo) {

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