Load the thesaurus config for the current container.

@param ContainerConfigurationInterface $containerConfig Search request container config.

@return ThesaurusConfig
421169
private function getConfig(ContainerConfigurationInterface $containerConfig)
    {
        $storeId       = $containerConfig->getStoreId();
        $containerName = $containerConfig->getName();

        return $this->thesaurusConfigFactory->create($storeId, $containerName);
    }
985771
public function loadInternal(array $config, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('services.yml');

        $bundles = $container->getParameter('kernel.bundles');

        $directories = [];
        if ($config['metadata']['auto_detection']) {
            foreach ($bundles as $name => $class) {
                $ref                                   = new \ReflectionClass($class);
                $directories[$ref->getNamespaceName()] = dirname($ref->getFileName()) . '/Resources/config/fixture';
            }
        }

        foreach ($config['metadata']['directories'] as $directory) {
            $directory['path'] = rtrim(str_replace('\\', '/', $directory['path']), '/');
            if ('@' === $directory['path'][0]) {
                preg_match('~^@([a-z0-9_]+)~i', $directory['path'], $match);

                if (isset($match[1])) {
                    list($prefixedBundleName, $bundleName) = $match;
                    if (!isset($bundles[$bundleName])) {
                        throw new RuntimeException(sprintf('The bundle "%s" has not been registered with AppKernel. Available bundles: %s', $bundleName, implode(', ', array_keys($bundles))));
                    }
                    $ref = new \ReflectionClass($bundles[$bundleName]);
                    $directory['path'] = dirname($ref->getFileName()).substr($directory['path'], strlen($prefixedBundleName));
                }
            }
            $directories[rtrim($directory['namespace_prefix'], '\\')] = rtrim($directory['path'], '\\/');
        }

        $container
            ->getDefinition('trappar_alice_generator.metadata.file_locator')
            ->addArgument($directories);

        $container
            ->getDefinition(YamlWriter::class)
            ->addArgument($config['yaml']['inline'])
            ->addArgument($config['yaml']['indent']);

        $container
            ->getDefinition(ValueVisitor::class)
            ->addArgument($config['strictTypeChecking']);
    }
1301456
public function configureSettings($config, ContainerBuilder $container)
    {
        $container->setParameter('rz_search.slugify_service',                                   $config['slugify_service']);
        $container->setParameter('rz_search.settings.search.pagination.per_page',               $config['search']['pagination']['per_page']);
        $container->setParameter('rz_search.settings.search.variables.search_query',            $config['search']['variables']['search_query']);
        $container->setParameter('rz_search.settings.search.variables.templates',               $config['search']['templates']);
        $container->setParameter('rz_search.settings.search.variables.default_identifier',      $config['search']['variables']['default_identifier']);

        $container->setParameter('rz_search.settings.search.controller.search',                 $config['search']['controller']['search']);
        $container->setParameter('rz_search.settings.search.controller.ajax',                   $config['search']['controller']['ajax']);
    }
692940
public function getConfiguration(array $config, ContainerBuilder $container)
    {
        $tempContainer = new ContainerBuilder();

        $loader = new Loader\XmlFileLoader($tempContainer, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('factories.xml');

        return new Configuration(
            $this->getServices('zenstruck_backup.namer_factory', $tempContainer),
            $this->getServices('zenstruck_backup.processor_factory', $tempContainer),
            $this->getServices('zenstruck_backup.source_factory', $tempContainer),
            $this->getServices('zenstruck_backup.destination_factory', $tempContainer)
        );
    }
986700
public function load(ContainerBuilder $container, array $config)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Resources'));
        $loader->load('services.xml');

        if (isset($config['fixtures'])) {
            $container->setParameter('behat.alice.fixtures.default', $config['fixtures']['default']);
            $container->setParameter('behat.alice.fixtures.key_paths', $config['fixtures']['key_paths']);
            $container->setParameter('behat.alice.fixtures.default_loading', $config['fixtures']['default_loading']);
        }

        if (isset($config['lifetime'])) {
            $container->setParameter('behat.alice.lifetime', $config['lifetime']);
        }

        $container->setParameter('behat.alice.faker.locale', $config['faker']['locale']);
        $container->setParameter('behat.alice.faker.providers', $config['faker']['providers']);

        $adapters = array();
        foreach ($config['adapters'] as $name => $adapter) {
            $adapters[$name] = $adapter['fixture_class'];

            if (isset($adapter['mapping'])) {
                $container->setParameter('behat.alice.elastica_mapping', $adapter['mapping']);
            }

            if (isset($adapter['index_service'])) {
                $container->setParameter('behat.alice.elastica_index', $adapter['index_service']);
            }
        }
        $container->setParameter('behat.alice.adapters', $adapters);
    }
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']);
            }
        }
    }
1294228
public static function getInstance(AnConfigInterface $config, AnServiceInterface $container)
    {
        if (!$container->has($config->service_identifier)) {
            $registry = $container->get('application.registry', array('key' => $config->service_identifier));

            if (!$registry->offsetExists('aggregations')) {
                $components = $container->get('repos:components.component')->fetchSet();

                $dispatcher = $container->get('anahita:event.dispatcher');
                $components->registerEventDispatcher($dispatcher);

                $aggregations = new AnConfig();
                $event = new AnEvent(array('aggregations' => $aggregations));

                $dispatcher->dispatchEvent('onStoryAggregation', $event);
                $registry->offsetSet('aggregations', $aggregations);
            }

            $container->set($config->service_identifier, $registry->offsetGet('aggregations'));
        }

        return $container->get($config->service_identifier);
    }
1171112
public function register(ContainerInterface $container, Configurable $config)
    {
        if ( ! $config instanceof Config) {
            throw new \InvalidArgumentException('Wrong Config object');
        }

        $entityManager = EntityManager::create(
            $config->database,
            Setup::createAnnotationMetadataConfiguration(
                $config->annotationDirs, $config->dev, $config->proxyDir, $config->cache, false
            )
        );

        $container->add($config->getServiceName(), $entityManager);
    }
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);
    }
797197
public function setContainer(ContainerInterface $container)
    {
        $application = $this;
        $container->share(ApplicationInterface::class, $application);
        $container->share(\Interop\Container\ContainerInterface::class, $container);

        $this->container = $container;

        return $this;
    }
766197
public function configureClass($config, ContainerBuilder $container)
    {
        // admin configuration
        $container->setParameter('networking_init_cms.admin.page.class', $config['class']['page']);
        $container->setParameter('networking_init_cms.admin.layout_block.class', $config['class']['layout_block']);
        $container->setParameter('networking_init_cms.admin.user.class', $config['class']['user']);

        // manager configuration
        $container->setParameter('networking_init_cms.manager.page.class', $config['class']['page']);
        $container->setParameter('networking_init_cms.manager.layout_block.class', $config['class']['layout_block']);
        $container->setParameter('networking_init_cms.manager.user.class', $config['class']['user']);

        switch ($config['db_driver']) {
            case 'orm':
                $container->setParameter('networking_init_cms.admin.layout_block.class', 'Networking\InitCmsBundle\Entity\LayoutBlock');
                break;
            case 'mongodb':
                $container->setParameter('networking_init_cms.admin.layout_block.class', 'Networking\InitCmsBundle\Docment\LayoutBlock');
                break;
            default:
                throw new \InvalidArgumentException('db driver must be either orm or mongodb');
                break;
        }
    }
441483
public function load(ContainerBuilder $container, array $config)
    {
        $container->setDefinition(self::API_CLIENT_ID, new Definition(ApiClient::class, [
            new Reference(SymfonyExtension::DRIVER_KERNEL_ID),
            $config['base_url']
        ]));

        $this->loadContextInitializer($container);
        $this->loadApiClientListener($container);

        $container->setParameter('symfony_api_extension.parameters', $config);
    }
540343
public function loadConfiguration(ConfigurationInterface $configuration)
    {
        $extAssocList = $configuration->getExternalAssociations();
        foreach ($extAssocList as $extAssoc) {
            $this->mapExternalAssociation($extAssoc);
        }
        return $this;
    }
1125939
protected function loadInternal(array $mergedConfig, ContainerBuilder $container)
    {
        $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config/services'));
        $loader->load('services.yml');
        $container->setParameter('tactician.merged_config', $mergedConfig);
        $this->configureSecurity($mergedConfig, $container);
        $this->configureLogger($mergedConfig, $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']));
    }
815478
public function load(ContainerBuilder $container, array $config)
    {
        if (null === $config['fixtures_base_path']) {
            $config['fixtures_base_path'] = sprintf('%s/features/fixtures', $container->getParameter('paths.base'));
        }

        foreach ($config as $key => $value) {
            $container->setParameter(sprintf('behat.%s.%s', $this->getConfigKey(), $key), $value);
        }

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Resources/config'));
        $loader->load('services.xml');
    }
644054
public function load(array $config, ContainerBuilder $container)
    {
        if (!isset($config['framework_path'])) {
            throw new \InvalidArgumentException('Specify `framework_path` parameter for silverstripe_extension');
        }

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

        $behatBasePath = $container->getParameter('behat.paths.base');
        $config['framework_path'] = realpath(sprintf('%s%s%s',
            rtrim($behatBasePath, DIRECTORY_SEPARATOR),
            DIRECTORY_SEPARATOR,
            ltrim($config['framework_path'], DIRECTORY_SEPARATOR)
        ));
        if (!file_exists($config['framework_path']) || !is_dir($config['framework_path'])) {
            throw new \InvalidArgumentException('Path specified as `framework_path` either doesn\'t exist or is not a directory');
        }

        $container->setParameter('behat.silverstripe_extension.framework_path', $config['framework_path']);
        $container->setParameter('behat.silverstripe_extension.admin_url', $config['admin_url']);
        $container->setParameter('behat.silverstripe_extension.login_url', $config['login_url']);
        $container->setParameter('behat.silverstripe_extension.screenshot_path', $config['screenshot_path']);
        $container->setParameter('behat.silverstripe_extension.ajax_timeout', $config['ajax_timeout']);
        if (isset($config['ajax_steps'])) {
            $container->setParameter('behat.silverstripe_extension.ajax_steps', $config['ajax_steps']);
        }
        if (isset($config['region_map'])) {
             $container->setParameter('behat.silverstripe_extension.region_map', $config['region_map']);
        }
    }