function KeyvalueMongodb::__construct in MongoDB 8
Construct this object.
Parameters
MongoCollectionFactory $mongo: The object wrapping the MongoDB database object.
$collection: Name of the key-value collection.
Overrides StorageBase::__construct
File
- src/
KeyvalueMongodb.php, line 35  
Class
- KeyvalueMongodb
 - This class holds a MongoDB key-value backend.
 
Namespace
Drupal\mongodbCode
function __construct(MongoCollectionFactory $mongo, $collection) {
  parent::__construct($collection);
  $this->mongo = $mongo;
  $this->mongo_collection = "keyvalue.{$this->collection}";
}