You are here

protected function QueueMongodb::mongoCollection in MongoDB 8

Return value

\MongoCollection

1 method overrides QueueMongodb::mongoCollection()
BatchQueueMongodb::mongoCollection in src/BatchQueueMongodb.php

File

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

Class

QueueMongodb
MongoDB queue implementation.

Namespace

Drupal\mongodb

Code

protected function mongoCollection() {
  if (!isset($this->mongo)) {
    $this->mongo = \Drupal::service('mongo');
  }
  return $this->mongo
    ->get($this->collection);
}