Loads the configured connections.

@param array $config An array of connections configurations
@param ContainerBuilder $container A ContainerBuilder instance
358817
protected function loadConnections(array $connections, ContainerBuilder $container)
    {
        $cons = array();
        foreach ($connections as $name => $connection) {
            // Define an event manager for this connection
            $eventManagerId = sprintf('doctrine_riak.odm.%s_connection.event_manager', $name);
            $container->setDefinition($eventManagerId, new DefinitionDecorator('doctrine_riak.odm.connection.event_manager'));

            $odmConnArgs = array(
                isset($connection['server']) ? $connection['server'] : null,
                isset($connection['options']) ? $connection['options'] : array(),
                new Reference(sprintf('doctrine_riak.odm.%s_configuration', $name)),
                new Reference($eventManagerId),
            );
            $odmConnDef = new Definition('%doctrine_riak.odm.connection.class%', $odmConnArgs);
            $id = sprintf('doctrine_riak.odm.%s_connection', $name);
            $container->setDefinition($id, $odmConnDef);
            $cons[$name] = $id;
        }
        $container->setParameter('doctrine_riak.odm.connections', $cons);
    }
10392
public function loadQueues(ContainerBuilder $container, array $config)
    {
        foreach ($config as $name => $attributes) {
            $container
                ->setDefinition(
                    self::getQueueServiceKey($name),
                    new Definition(
                        $container->getParameter('llssqs.model.queue.class'),
                        array(
                            new Reference(
                                LLSAWSExtension::getServiceServiceKey($attributes['service'])
                            ),
                            new Reference('llssqs.model.message.factory'),
                            $attributes['name']
                        )
                    )
                );
        }

        return $this;
    }
337945
public function load(ContainerBuilder $container, array $config)
    {
        $container->setParameter('genesis.failaid.config.screenshotDirectory', $config['screenshotDirectory']);
        $container->setParameter('genesis.failaid.config.screenshotMode', $config['screenshotMode']);

        if (! isset($config['debugBarSelectors'])) {
            $config['debugBarSelectors'] = [];
        }
        $container->setParameter('genesis.failaid.config.debugBarSelectors', $config['debugBarSelectors']);

        if (! isset($config['siteFilters'])) {
            $config['siteFilters'] = [];
        }
        $container->setParameter('genesis.failaid.config.siteFilters', $config['siteFilters']);

        $definition = new Definition(Initializer::class, [
            '%genesis.failaid.config.screenshotDirectory%',
            '%genesis.failaid.config.screenshotMode%',
            '%genesis.failaid.config.siteFilters%',
            '%genesis.failaid.config.debugBarSelectors%',
        ]);
        $definition->addTag(ContextExtension::INITIALIZER_TAG);
        $container->setDefinition(self::CONTEXT_INITIALISER, $definition);
    }
476393
public function load(array $configs, ContainerBuilder $container)
    {
        // Set Fragment Cache disabled by default
        if (!$container->hasParameter('andres_montanez_fragment_cache.enabled')) {
            $container->setParameter('andres_montanez_fragment_cache.enabled', false);
        }

        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.yml');
    }
1353242
public function load(array $configs, ContainerBuilder $container)
    {
        $processor = new Processor();

        $reflectionObject = new \ReflectionObject($this);
        $loader = new Loader\XmlFileLoader($container, new FileLocator(dirname($reflectionObject->getFileName()).'/../Resources/config'));

        $configuration = new Configuration();
        $config = $processor->processConfiguration($configuration, $configs);

        $parameterBuilder = new ParameterBuilder($container);
        $parameterBuilder->build(Constants::ROOT_PARAMETER, $config);

        $this->loadXmlServices($loader);

        if (Driver::BOTH === $container->getParameter(Constants::ROOT_PARAMETER.'.admin.driver')) {
            $container->setParameter(Constants::ROOT_PARAMETER.'.admin.backend_type_orm', true);
            $container->setParameter(Constants::ROOT_PARAMETER.'.admin.backend_type_odm', true);

            $loader->load('orm.xml');
            $loader->load('odm.xml');
        } else {
            $driver = $container->getParameter(Constants::ROOT_PARAMETER.'.admin.driver');
            $container->setParameter(Constants::ROOT_PARAMETER.'.admin.backend_type_'.$driver, true);

            $loader->load($driver.'.xml');
        }
    }
1095
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));

        if (!$container->hasDefinition('piwik.client')) {
            $loader->load('piwik.xml');
        }

        $config = $this->mergeConfigs($configs);

        if (isset($config['connection'])) {
            $definition     = $container->getDefinition('piwik.client');
            $arguments      = $definition->getArguments();
            $arguments[0]   = new Reference($config['connection']);
            $definition->setArguments($arguments);
        }

        if (isset($config['url'])) {
            $container->setParameter('piwik.connection.http.url', $config['url']);
        }

        if (isset($config['init'])) {
            $container->setParameter('piwik.connection.piwik.init', (bool) $config['init']);
        }

        if (isset($config['token'])) {
            $container->setParameter('piwik.client.token', $config['token']);
        }
    }
900134
public function load(ContainerBuilder $container, array $config): void
    {
        $this->crossContainerProcessor->addContainerAccessor('behat', new ContainerBasedContainerAccessor($container));
    }
1143906
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();

        $config = $this->processConfiguration($configuration, $configs);

        $container->setParameter(
            static::OVERRIDE_KERNEL_TEMPLATES_PARAM_NAME,
            $config['override_kernel_templates']
        );
    }
370357
public function load(array $config, ContainerBuilder $container)
    {
        $config = $this->processConfiguration(new Configuration(), $config);
        $loader = new XMLFileLoader($container, new FileLocator(__DIR__.'/../Resources/config/'));
        $loader->load('services.xml');
        $serviceDefDataFetcher = $container->getDefinition('chameleon_system_amazon_payment.config_provider');
        $serviceDefDataFetcher->replaceArgument(0, $config);
    }
1068038
public function load(ContainerBuilder $container, array $config)
  {
    $template_dir = __DIR__."/views/";
    if (isset($config["templates"]["dir"]))
    {
      $template_dir = $config["templates"]["dir"];
    }
    
    $definition = new Definition('\Twig_Loader_Filesystem', array($template_dir));
    $container->setDefinition("behat.twig_output.twig.loader", $definition);
    
    $definition = new Definition('\Twig_Environment', array(new Reference("behat.twig_output.twig.loader")));
    $container->setDefinition("behat.twig_output.twig.templating", $definition);
    
    $definition = new Definition('chartinger\Behat\TwigReportExtension\EventListener', array(new Reference("behat.twig_output.twig.templating")));
    $definition->addTag(EventDispatcherExtension::SUBSCRIBER_TAG, array());
    $definition->addMethodCall("setTemplate",array($config["templates"]["file"]));
    $definition->addMethodCall("setOutputFile",array($config["output"]["file"]));
    $definition->addMethodCall("setOutputDirectory",array($config["output"]["dir"]));
    $container->setDefinition("behat.twig_output.listener.event", $definition);
  }
918333
protected function loadConnections(array $connections, ContainerBuilder $container)
    {
        $cons = [];
        foreach ($connections as $name => $connection) {
            // Define an event manager for this connection
            $eventManagerId = sprintf('doctrine_mongodb.odm.%s_connection.event_manager', $name);
            $container->setDefinition(
                $eventManagerId,
                $this->getChildDefinitionOrDefinitionDecorator('doctrine_mongodb.odm.connection.event_manager')
            );

            $configurationId = sprintf('doctrine_mongodb.odm.%s_configuration', $name);
            $container->setDefinition(
                $configurationId,
                new Definition('%doctrine_mongodb.odm.configuration.class%')
            );

            $odmConnArgs = [
                $connection['server'] ?? null,
                $connection['options'] ?? [],
                $this->normalizeDriverOptions($connection),
            ];

            $odmConnDef = new Definition('%doctrine_mongodb.odm.connection.class%', $odmConnArgs);
            $odmConnDef->setPublic(true);
            $id = sprintf('doctrine_mongodb.odm.%s_connection', $name);
            $container->setDefinition($id, $odmConnDef);
            $cons[$name] = $id;
        }

        $container->setParameter('doctrine_mongodb.odm.connections', $cons);
    }
294609
public function loadServices(ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/config'));
        $loader->load('services.xml');
        $this->imageDrivers = $this->driverLocator->findDrivers(
            $container,
            $this->imageDriverKeys,
            $this->imageDriverConfigs
        );
    }
882721
public function load(array $config, ContainerBuilder $container)
    {
        $container->setParameter('maba_oauth_commerce.internal_client.default_base_url', null);

        $container
            ->register(
                'maba_oauth_commerce.normalizer.client_credentials',
                'Maba\OAuthCommerceInternalClient\Normalizer\ClientCredentialsNormalizer'
            )
            ->setArguments(array(new Reference('maba_oauth_commerce.algorithm_manager')))
            ->addTag('maba_oauth_commerce.normalizer')
            ->setPublic(false)
        ;
        $container
            ->setDefinition(
                'maba_oauth_commerce.factory.internal',
                new DefinitionDecorator('maba_oauth_commerce.factory.base')
            )
            ->addMethodCall('setDefaultBaseUrl', array('%maba_oauth_commerce.internal_client.default_base_url%'))
            ->setClass('Maba\OAuthCommerceInternalClient\InternalClientFactory')
        ;
    }
449072
private function loadElasticsearch(array $config, ContainerBuilder $container): void
    {
        $pass = new CollectorCompilerPass('pucene.elasticsearch.visitor', 'pucene.elasticsearch.visitor_pool', 'query');
        $pass->process($container);
    }
1157267
protected function loadConfiguration(array $config, ContainerBuilder $container)
    {
        // Load page nested routes
        $routeConfigurationChain = $container->findDefinition('lp_factory.route_configuration.chain');
        foreach ($config['routes'] as $alias => $routeConfiguration) {
            $routeConfigurationChain->addMethodCall('add', array($alias, $routeConfiguration));
        }

        $routeFactoryId = $config['service_ids']['factory'];
        $treeStrategyId = $config['service_ids']['strategy'];

        // Inject service route factory
        $routeProvider = $container->findDefinition('lp_factory.route_provider');
        $routeProvider->replaceArgument(0, new Reference($routeFactoryId));
        $routeProvider->replaceArgument(3, new Reference($treeStrategyId));

        // Add repository and strategy arguments
        $routeFactory = $container->findDefinition($routeFactoryId);
        $routeFactory->replaceArgument(0, new Reference($config['repository']));
        $routeFactory->replaceArgument(1, new Reference($treeStrategyId));
        $abstractStrategy = $container->findDefinition('lp_factory.route_strategy.abstract');
        $abstractStrategy->replaceArgument(0, new Reference($config['repository']));
    }
526255
protected function loadConfigurationRecursive(ContainerBuilder $container, array $configuration)
    {
        foreach ($configuration as $values) {
            $loader = new XmlFileLoader($container, new FileLocator($values['path']));
            foreach ($values['configFiles'] as $configFile) {
                $loader->load($configFile);
            }
            if (array_key_exists('configuration', $values)) {
                $this->loadConfigurationRecursive($container, $values['configuration']);
            }
        }
    }
35734
public function load(array $configs, ContainerBuilder $container)
    {
        $config = $this->processConfiguration(
            $this->getConfiguration($configs, $container),
            $configs
        );

        $container->setParameter('liip_imagine.resolvers', $config['resolvers']);
        $container->setParameter('liip_imagine.loaders', $config['loaders']);

        $this->loadResolvers($config['resolvers'], $container);
        $this->loadLoaders($config['loaders'], $container);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('imagine.xml');
        $loader->load('commands.xml');

        if ($config['enqueue']) {
            $loader->load('enqueue.xml');
        }

        $container->setParameter('liip_imagine.driver_service', 'liip_imagine.'.$config['driver']);

        $container->setAlias('liip_imagine', new Alias('liip_imagine.'.$config['driver']));
        $container->setAlias(CacheManager::class, new Alias('liip_imagine.cache.manager', false));
        $container->setAlias(DataManager::class, new Alias('liip_imagine.data.manager', false));
        $container->setAlias(FilterManager::class, new Alias('liip_imagine.filter.manager', false));

        $container->setParameter('liip_imagine.cache.resolver.default', $config['cache']);

        $container->setParameter('liip_imagine.default_image', $config['default_image']);

        $container->setParameter('liip_imagine.filter_sets', $config['filter_sets']);
        $container->setParameter('liip_imagine.binary.loader.default', $config['data_loader']);

        $container->setParameter('liip_imagine.controller.filter_action', $config['controller']['filter_action']);
        $container->setParameter('liip_imagine.controller.filter_runtime_action', $config['controller']['filter_runtime_action']);

        $container->setParameter('twig.form.resources', array_merge(
            $container->hasParameter('twig.form.resources') ? $container->getParameter('twig.form.resources') : [],
            ['@LiipImagine/Form/form_div_layout.html.twig']
        ));
    }