public function DatabaseFactory::__construct in MongoDB 8.2
Constructor.
Parameters
\Drupal\mongodb\ClientFactory $clientFactory: The Client factory service.
\Drupal\Core\Site\Settings $settings: The settings service.
File
- modules/
mongodb/ src/ DatabaseFactory.php, line 39
Class
- DatabaseFactory
- Helper class to construct a MongoDB Database with Drupal specific config.
Namespace
Drupal\mongodbCode
public function __construct(ClientFactory $clientFactory, Settings $settings) {
$this->clientFactory = $clientFactory;
$this->settings = $settings
->get('mongodb')['databases'];
}