class QueueMongodbFactory in MongoDB 8
Defines the queue factory for the MongoDB backend.
Hierarchy
- class \Drupal\mongodb\QueueMongodbFactory
Expanded class hierarchy of QueueMongodbFactory
1 string reference to 'QueueMongodbFactory'
1 service uses QueueMongodbFactory
File
- src/
QueueMongodbFactory.php, line 13 - Contains \Drupal\mongodb\QueueMongodbFactory.
Namespace
Drupal\mongodbView source
class QueueMongodbFactory {
/**
* Mongo collection factory.
*
* @var \Drupal\mongodb\MongoCollectionFactory $mongo
*/
protected $mongo;
/**
* Constructs this factory object.
*
* @param \Drupal\mongodb\MongoCollectionFactory $mongo
* Mongo collection factory.
*/
function __construct(MongoCollectionFactory $mongo) {
$this->mongo = $mongo;
}
/**
* Constructs a new queue object for a given name.
*
* @param string $name
* The name of the collection holding key and value pairs.
*
* @return \Drupal\mongodb\QueueMongodb
* A queue implementation for the given queue.
*/
public function get($name) {
return new QueueMongodb($this->mongo, $name);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
QueueMongodbFactory:: |
protected | property | Mongo collection factory. | |
QueueMongodbFactory:: |
public | function | Constructs a new queue object for a given name. | |
QueueMongodbFactory:: |
function | Constructs this factory object. |