@param YamlFileLoader $loader
@param ContainerBuilder $container
@param array $data
@param string $defaultConnectionHandler

@throws \Exception
160940
private function buildWindows(YamlFileLoader $loader, ContainerBuilder $container, array $data, string $defaultConnectionHandler = null)
    {
        if ($data['connection_handler'] !== null) {
            $connectionHandler = $data['connection_handler'];
        } elseif ($defaultConnectionHandler !== null) {
            $connectionHandler = $defaultConnectionHandler;
        } else {
            $connectionHandler = 'isset_bv_push_notification.windows.connection.handler';
            $loader->load('windows.yml');
        }

        $definition = $container->register('isset_bv_push_notification.windows.notifier', WindowsNotifier::class);
        $definition->addArgument(new Reference($connectionHandler));
        $definition->addTag('isset_bv_push_notification.notifier');

        foreach ($data['connections'] as $type => $connection) {
            $definition = $container->register('isset_bv_push_notification.windows.connection.' . $type, WindowsConnection::class);
            $definition->addArgument($type);
            $definition->addArgument($connection['default']);
            $definition->addTag('isset_bv_push_notification.windows.connection');
        }
    }
47759
public function load(array $config, ContainerBuilder $container): void
    {
        $config = $this->processConfiguration($this->getConfiguration([], $container), $config);
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.xml');

        if ($config['assets']['enabled']) {
            $loader->load('services/integrations/assets.xml');
        }

        if ($config['templating']['enabled']) {
            $loader->load('services/integrations/templating.xml');
        }

        if ($config['translations']['enabled']) {
            $loader->load('services/integrations/translations.xml');
        }

        $this->resolveConfigurationSources($container, $config);

        $container->setAlias('sylius.context.theme', $config['context']);
        $container->setAlias(ThemeContextInterface::class, 'sylius.context.theme');
    }
380587
public function registerLoader($alias, $loader)
    {
        if ($this->hasLoader($alias)) {
            throw new \RuntimeException(sprintf('Alias "%s" already used by another form loader', $alias));
        }

        $this->loaders[$alias] = $loader;
    }
1212084
private function loadDrupal(FileLoader $loader, ContainerBuilder $container, array $config)
    {
        if (isset($config['drupal'])) {
            $loader->load('drivers/drupal.yml');
            $container->setParameter('drupal.driver.drupal.drupal_root', $config['drupal']['drupal_root']);
        }
    }
310205
public function load(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader(
            $container,
            new FileLocator(__DIR__ . '/../Resources/config')
        );

        // Base services override
        $loader->load('services.yml');
    }
646855
public function load (array $config, ContainerBuilder $container)
    {
        // parse configuration
        $parsedConfiguration = $this->processConfiguration(new Configuration(), $config);

        // load services
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yml');

        // build role collection
        $builder = new RoleCollectionBuilder();

        $roleCollectionDefinition = $container->getDefinition("becklyn.static_roles.role_collection");
        $roleCollectionDefinition->replaceArgument(0, $builder->prepareRoleCollection($parsedConfiguration["roles"]));
    }
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']);
        }
    }
769826
public function load(array $configs, ContainerBuilder $containerBuilder)
    {
        // This parameter is unused, but not optional. This line will avoid a static analysis warning this.
        $configs;

        $loader = new YamlFileLoader($containerBuilder, new FileLocator(__DIR__ . '/../../config'));
        $loader->load('services.yml');
    }
1189455
public function load(array $configs, ContainerBuilder $container)
    {
        // Load DoctrineRiakBundle/Resources/config/riak.xml
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('riak.xml');

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

        if (empty($config['default_connection'])) {
            $keys = array_keys($config['connections']);
            $config['default_connection'] = reset($keys);
        }
        $container->setParameter('doctrine_riak.odm.default_connection', $config['default_connection']);

        if (empty($config['default_document_manager'])) {
            $keys = array_keys($config['document_managers']);
            $config['default_document_manager'] = reset($keys);
        }
        $container->setParameter('doctrine_riak.odm.default_document_manager', $config['default_document_manager']);

        // set some options as parameters and unset them
        $config = $this->overrideParameters($config, $container);

        // load the connections
        $this->loadConnections($config['connections'], $container);

        // load the document managers
        $this->loadDocumentManagers(
            $config['document_managers'],
            $config['default_document_manager'],
            $config['default_database'],
            $container
        );

        if ($config['resolve_target_documents']) {
            $def = $container->findDefinition('doctrine_riak.odm.listeners.resolve_target_document');
            foreach ($config['resolve_target_documents'] as $name => $implementation) {
                $def->addMethodCall('addResolveTargetDocument', array($name, $implementation, array()));
            }
            $def->addTag('doctrine_riak.odm.event_listener', array('event' => 'loadClassMetadata'));
        }

        // BC Aliases for Document Manager
        //$container->setAlias('doctrine.odm.riak.document_manager', new Alias('doctrine_riak.odm.document_manager'));
    }
1126737
public function addLoader(Loader $loader)
    {
        $loader->setLocator($this->locator);

        $this->resolver->addLoader($loader);
    }
75723
public function load(array $configs, ContainerBuilder $container): void
    {
        $configuration = new Req2CmdConfiguration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));

        $loader->load('actions.xml');
        $loader->load('extractors.xml');
        $loader->load('listeners.xml');
        $loader->load('param_mappers.xml');
        $loader->load('command_bus.xml');
        $loader->load('serializer.xml');

        $this->configureExtractors($config, $container);
        $this->configureCommandBus($config, $container);
        $this->configureEventListeners($config, $container);
    }
987186
public function load(LoaderInterface $loader, $merge = true)
    {
        $this->internalLoad($loader->load(), $merge);
    }
412417
private function handleLocale(array $config, ContainerBuilder $container, FileLoader $loader)
    {
        $loader->load('locale.yml');
        $container->setParameter(
            'ezpublish.locale.conversion_map',
            $config['locale_conversion'] + $container->getParameter('ezpublish.locale.conversion_map')
        );
    }
237056
private function loadProjectServices(SymfonyContainerBuilder $symfonyContainer)
    {
        try {
            $this->cleanupProjectYaml();
            $loader = new YamlFileLoader($symfonyContainer, new FileLocator());
            $loader->load($this->context->getGeneratedProjectFilePath());
        } catch (FileLocatorFileNotFoundException $exception) {
            // In case project file not found, do nothing.
        }
    }
184146
private function replaceDefaultStrategy(ContainerBuilder $container)
    {
        if (!$container->has('assets._default_package')) {
            throw new Exception('Default package does not exist.');
        }

        $defaultPackage = $container->getDefinition('assets._default_package');

        $class = $this->getPackageClass($defaultPackage, $container);

        if ($class === null) {
            throw new Exception(
                sprintf('Unable to resolve the class of the service "%s"', 'assets._default_package')
            );
        }

        $index = $this->getIndexForVersionStrategyArgument($class);

        $defaultPackage->replaceArgument(
            $index,
            new Reference('irozgar_gulp_rev_versions.asset.gulp_rev_version_strategy')
        );
    }
648270
protected function setFilesParameters(ContainerBuilder $container, array $config, YamlFileLoader $loader)
    {
        $container->setParameter(
            'open_orchestra_media_admin.files.thumbnail_format',
            $config['thumbnail']
        );

        $container->setParameter(
            'open_orchestra_media_admin.files.alternatives.default.thumbnail',
            $config['files']['alternatives']['default']['thumbnail']
        );

        $container->setParameter(
            'open_orchestra_media_admin.files.alternatives.audio.thumbnail',
            $config['files']['alternatives']['audio']['thumbnail']
            );

        if (count($config['files']['alternatives']['image']['formats']) > 0) {
            $container->setParameter(
                'open_orchestra_media_admin.files.alternatives.image.formats',
                $config['files']['alternatives']['image']['formats']
            );
        } else {
            $loader->load('alternatives_formats.yml');
        }
    }
1288962
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('mustache.xml');

        foreach ($configs as &$config) {
            if (isset($config['globals'])) {
                foreach ($config['globals'] as $name => $value) {
                    if (is_array($value) && isset($value['key'])) {
                        $config['globals'][$name] = array(
                            'key'   => $name,
                            'value' => $config['globals'][$name],
                        );
                    }
                }
            }
        }

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

        $def = $container->getDefinition('mustache');

        if (isset($config['loader_id'])) {
            $loader = new Reference($config['loader_id']);
        } else {
            $loader = new Reference('mustache.loader');
        }
        $def->addMethodCall('setLoader', array($loader));

        if (isset($config['partials_loader_id'])) {
            $partialsLoader = new Reference($config['partials_loader_id']);
        } else {
            $partialsLoader = $loader;
        }
        $def->addMethodCall('setPartialsLoader', array($partialsLoader));

        if (!empty($config['globals'])) {
            $def = $container->getDefinition('mustache');
            foreach ($config['globals'] as $key => $global) {
                if (isset($global['type']) && 'service' === $global['type']) {
                    $def->addMethodCall('addHelper', array($key, new Reference($global['id'])));
                } else {
                    $def->addMethodCall('addHelper', array($key, $global['value']));
                }
            }
        }
        unset($config['globals'], $config['loader_id'], $config['partials_loader_id']);
        $container->setParameter('mustache.options', $config);

        $this->addClassesToCompile(array(
            'Mustache_Context',
            'Mustache_HelperCollection',
            'Mustache_Loader',
            'Mustache_Loader_FilesystemLoader',
            'Mustache_Engine',
            'Mustache_Template',
        ));
    }