You are here

public function QueueMongodb::__construct in MongoDB 8

Construct this object.

Parameters

MongoCollectionFactory $mongo: MongoDB collection factory.

string $collection: Name of the queue.

1 method overrides QueueMongodb::__construct()
BatchQueueMongodb::__construct in src/BatchQueueMongodb.php
Construct this object.

File

src/QueueMongodb.php, line 40
Contains \Drupal\mongodb\QueueMongodb

Class

QueueMongodb
MongoDB queue implementation.

Namespace

Drupal\mongodb

Code

public function __construct(MongoCollectionFactory $mongo, $name) {
  $this->mongo = $mongo;
  $this->collection = 'queue.' . $name;
}