public function Logger::eventCollections in MongoDB 8.2
List the event collections.
Return value
\MongoDB\Model\CollectionInfoIterator The collections with a name matching the event pattern.
File
- modules/
mongodb_watchdog/ src/ Logger.php, line 609
Class
- Logger
- Class Logger is a PSR/3 Logger using a MongoDB data store.
Namespace
Drupal\mongodb_watchdogCode
public function eventCollections() : CollectionInfoIterator {
$options = [
'filter' => [
'name' => [
'$regex' => static::EVENT_COLLECTIONS_PATTERN,
],
],
];
$result = $this->database
->listCollections($options);
return $result;
}