class MongoDbServiceOverrideProvider in MongoDB 8
Hierarchy
- class \Drupal\mongodb\MongoDbServiceOverrideProvider implements ServiceProviderInterface
Expanded class hierarchy of MongoDbServiceOverrideProvider
File
- src/
MongoDbServiceOverrideProvider.php, line 15 - Contains \Drupal\mongodb\MongoDbServiceOverrideProvider.
Namespace
Drupal\mongodbView source
class MongoDbServiceOverrideProvider implements ServiceProviderInterface {
/**
* {@inheritdoc}
*/
public function register(ContainerBuilder $container) {
$container
->setParameter('default_backend', 'mongodb');
$kv = $container
->getParameter('factory.keyvalue');
$kv['default'] = 'keyvalue.mongodb';
$container
->setParameter('factory.keyvalue', $kv);
$kve = $container
->getParameter('factory.keyvalue.expirable');
$kve['keyvalue_expirable_default'] = 'keyvalue.expirable.mongodb';
$container
->setParameter('factory.keyvalue.expirable', $kve);
$container
->setAlias('config.storage', 'mongodb.config.storage');
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MongoDbServiceOverrideProvider:: |
public | function |
Registers services to the container. Overrides ServiceProviderInterface:: |