protected function MongoCollectionFactory::getServer in MongoDB 8
Returns the server for a given collection.
Parameters
$collection_name:
Return value
array
1 call to MongoCollectionFactory::getServer()
File
- src/
MongoCollectionFactory.php, line 155 - Definition of Drupal\mongodb\MongodbBundle.
Class
- MongoCollectionFactory
- Creates mongo collections based on settings.
Namespace
Drupal\mongodbCode
protected function getServer($collection_name) {
$server_index = isset($this->collectionInfo[$collection_name]) ? $this->collectionInfo[$collection_name] : 'default';
return $this->serverInfo[$server_index];
}