public function KeyValueStore::__construct in MongoDB 8.2
KeyValueStore constructor.
Parameters
string $collection: The KV collection name.
\MongoDB\Collection|null $storeCollection: The eponymous MongoDB collection.
Overrides StorageBase::__construct
1 call to KeyValueStore::__construct()
- KeyValueStoreExpirable::__construct in modules/
mongodb_storage/ src/ KeyValueStoreExpirable.php
1 method overrides KeyValueStore::__construct()
- KeyValueStoreExpirable::__construct in modules/
mongodb_storage/ src/ KeyValueStoreExpirable.php
File
- modules/
mongodb_storage/ src/ KeyValueStore.php, line 50
Class
- KeyValueStore
- Class KeyValueStore provides a KeyValueStore as a MongoDB collection.
Namespace
Drupal\mongodb_storageCode
public function __construct($collection, Collection $storeCollection = NULL) {
parent::__construct($collection);
$this->collectionName = $storeCollection
->getCollectionName();
$this->mongoDbCollection = $storeCollection;
}