You are here

class MongoDbServiceOverrideProvider in MongoDB 8

Hierarchy

Expanded class hierarchy of MongoDbServiceOverrideProvider

File

src/MongoDbServiceOverrideProvider.php, line 15
Contains \Drupal\mongodb\MongoDbServiceOverrideProvider.

Namespace

Drupal\mongodb
View 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