Loads the web profiler configuration.

@param array            $configs   An array of configuration settings
@param ContainerBuilder $container A ContainerBuilder instance
435502
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

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

        if ($config['toolbar'] || $config['intercept_redirects']) {
            $loader->load('toolbar.xml');
            $container->getDefinition('web_profiler.debug_toolbar')->replaceArgument(4, $config['excluded_ajax_paths']);
            $container->setParameter('web_profiler.debug_toolbar.intercept_redirects', $config['intercept_redirects']);
            $container->setParameter('web_profiler.debug_toolbar.mode', $config['toolbar'] ? WebDebugToolbarListener::ENABLED : WebDebugToolbarListener::DISABLED);
        }

        if (Kernel::VERSION_ID >= 40008 || (Kernel::VERSION_ID >= 30408 && Kernel::VERSION_ID < 40000)) {
            $container->getDefinition('debug.file_link_formatter')
                ->replaceArgument(3, new ServiceClosureArgument(new Reference('debug.file_link_formatter.url_format')));
        }
    }
416297
protected function setConfigParameters(array $configs, ContainerBuilder $container): void
    {
        foreach ($this->getConfigParameters() as $parameter) {
            $keys = explode('.', $parameter);
            $value = $configs;
            foreach ($keys as $key) {
                $value = $value[$key];
            }
            $container->setParameter($this->getAlias().'.'.$parameter, $value);
        }
    }
1342903
public function load(array $configs, ContainerBuilder $container)
    {
        $processor = new Processor();
        $configuration = new Configuration();
        $config = $processor->processConfiguration($configuration, $configs);

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

        $httpClient = $config['http_client'];
        $httpClientOptions = $config['http_client_options'];
        $clientConfigurations = $config['clients'];

        $clientServiceKeys = [];
        foreach ($clientConfigurations as $key => $clientConfig) {
            // manually make sure "type" is there
            if (!isset($clientConfig['type'])) {
                throw new InvalidConfigurationException(sprintf(
                    'Your "knpu_oauth2_client.clients.%s" config entry is missing the "type" key.',
                    $key
                ));
            }

            $type = $clientConfig['type'];
            unset($clientConfig['type']);
            if (!isset(self::$supportedProviderTypes[$type])) {
                throw new InvalidConfigurationException(sprintf(
                    'The "knpu_oauth2_client.clients" config "type" key "%s" is not supported. We support (%s)',
                    $type,
                    implode(', ', self::$supportedProviderTypes)
                ));
            }

            // process the configuration
            $tree = new TreeBuilder('knpu_oauth2_client/clients/' . $key);
            $node = method_exists($tree, 'getRootNode')
                ? $tree->getRootNode()
                : $tree->root('knpu_oauth2_client/clients/' . $key);

            $this->buildConfigurationForType($node, $type);
            $processor = new Processor();
            $config = $processor->process($tree->buildTree(), [$clientConfig]);

            $configurator = $this->getConfigurator($type);

            $providerOptions = $configurator->getProviderOptions($config);

            $collaborators = [];
            if ($httpClient) {
                $collaborators['httpClient'] = new Reference($httpClient);
            } else {
                $providerOptions = array_merge($providerOptions, $httpClientOptions);
            }
            // hey, we should add the provider/client service!
            $clientServiceKey = $this->configureProviderAndClient(
                $container,
                $type,
                $key,
                $configurator->getProviderClass($config),
                $configurator->getClientClass($config),
                $configurator->getPackagistName(),
                $providerOptions,
                $config['redirect_route'],
                $config['redirect_params'],
                $config['use_state'],
                $collaborators
            );

            $clientServiceKeys[$key] = $clientServiceKey;
        }

        $container->getDefinition('knpu.oauth2.registry')
            ->replaceArgument(1, $clientServiceKeys);
    }
515466
public function load(array $configs, ContainerBuilder $container)
    {
        array_unshift($configs, [
            'files' => [
                'web' => [
                    'directory' => $container->getParameter('kernel.root_dir') . '/../web',
                    'exclude' => '*.php',
                ]
            ],
            'routes' => [
                'pages' => [
                    'route' => '_slug',
                    'generator' => 'nodes',
                ],
                'sitemap_index' => [
                    'route' => 'KunstmaanSitemapBundle_sitemapindex',
                    'defaults' => [
                        '_format' => 'xml',
                    ]
                ],
                'sitemaps' => [
                    'route' => 'KunstmaanSitemapBundle_sitemap',
                    'generator' => 'locales',
                    'defaults' => [
                        '_format' => 'xml',
                    ]
                ],
                'robots' => [
                    'route' => 'KunstmaanSeoBundle_robots',
                ]
            ],
            'extensions' => [
                "css" => "text/css",
                "js" => "text/javascript",
                "svg" => "image/svg+xml",
                "map" => "application/json",
                "jpg" => "image/jpeg",
                "jpeg" => "image/jpeg",
                "png" => "image/png",
                "ttf" => "font/ttf",
                "otf" => "application/x-font-opentype",
                "woff" => "application/font-woff",
                "woff2" => "application/font-woff2",
                "eot" => "application/vnd.ms-fontobject",
            ]
        ]);

        $configs = (new Processor)->processConfiguration(new Configuration, $configs);

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

        $container->setParameter('nassau.static_site.url_prefix', $configs['url_prefix']);
        $container->setParameter('nassau.static_site.extensions', $configs['extensions']);
        $this->configureRoutes($container, $configs['routes']);
        $this->configureFiles($container, $configs['files']);
    }
692233
public function load(ContainerBuilder $container, array $config)
    {
        $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/config'));
        $loader->load('services.xml');

        if (!empty($config['path'])) {
            if (isset($config['path']['resources'])) {
                $container->setParameter('paths.resources.resource', $config['path']['resources']);
            }

            if (isset($config['path']['base'])) {
                $container->setParameter('paths.resources.base', $config['path']['base']);
            }
        }

        if (!empty($config['resource_map'])) {
            $container->setParameter('resource.map', $config['resource_map']);
        }
    }
352307
public function load(array $configs, ContainerBuilder $container)
    {
        parent::load($configs, $container);

        // define alias for the strategy to extract the authentication key from the Airlock request.
        $container->setAlias(
            'graviton.security.authentication.strategy',
            $container->getParameter('graviton.security.authentication.strategy')
        );

        $container->setAlias(
            'graviton.security.authentication.dynamic.model',
            $container->getParameter('graviton.security.authentication.provider.model')
        );
    }
639283
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $this->config = $this->processConfiguration($configuration, $configs);

        foreach (ServicesFactory::getAvailableServices() as $service) {
            $serviceKey = StringUtil::camelcaseToUnderscore($service);
            $definition = new Definition('Aws\\'.$service.'\\'.$service.'Client', array($this->getConfig($serviceKey)));
            $definition->setPublic(true);
            $container->setDefinition('aws.'.$serviceKey, $definition);
        }
    }
418945
public function load(array $configs, ContainerBuilder $container)
    {
        $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
        $loader->load('services.yaml');

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

        $formRendererDefinition = $container->getDefinition(RendererEngine::class);
        $formRendererDefinition->setArgument(1, $config['themes']);
    }
1297229
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $processor = new Processor();

        $config = $processor->processConfiguration($configuration, $configs);
        $container->setParameter('white_october_pagerfanta.default_view', $config['default_view']);

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

        if ($config['exceptions_strategy']['out_of_range_page'] == Configuration::EXCEPTION_STRATEGY_TO_HTTP_NOT_FOUND) {
            $convertListener = $container->getDefinition('pagerfanta.convert_not_valid_max_per_page_to_not_found_listener');
            $convertListener->addTag('kernel.event_subscriber');
        }

        if ($config['exceptions_strategy']['not_valid_current_page'] == Configuration::EXCEPTION_STRATEGY_TO_HTTP_NOT_FOUND) {
            $convertListener = $container->getDefinition('pagerfanta.convert_not_valid_current_page_to_not_found_listener');
            $convertListener->addTag('kernel.event_subscriber');
        }
    }
569975
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
        $loader->load('model.xml');
        $loader->load('form.xml');
        $loader->load('helper.xml');
        $loader->load('reader.xml');
        $loader->load('converter.xml');
        $loader->load('loader.xml');
        $loader->load('manager.xml');
        $loader->load('twig_extension.xml');
        $loader->load('validator.xml');
        $loader->load('cache.xml');

        $this->loadRepository($loader, $container, $config);
        $this->loadManager($loader, $container, $config);
        $this->loadRepoClass($loader, $container, $config);
        $this->loadCachePath($container, $config);
        $this->loadVersionEyeKey($container, $config);
    }
406328
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration( $configuration, $configs );

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

        //Services to use are stored as parameters and will be processes by Compiler\ServiceAliasesPass
        $container->setParameter( self::FACADE_SERVICE_ID, $config['facade'] );
        $container->setParameter( self::FORM_PROVIDER_SERVICE_ID, $config['providers']['form'] );
        $container->setParameter( self::HANDLER_PROVIDER_SERVICE_ID, $config['providers']['handler'] );
        $container->setParameter( self::RESPONSE_PROVIDER_SERVICE_ID, $config['providers']['response'] );
    }
526225
public function load(array $configs, ContainerBuilder $container)
    {
        $configs = (new Processor)->processConfiguration(new Configuration(), $configs);

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

        if (extension_loaded("redis")) {
            $container->setParameter('kunstmaan_extra.redis_host', $configs['redis']['host']);
            $container->setParameter('kunstmaan_extra.redis_port', $configs['redis']['port']);
            $container->setParameter('kunstmaan_extra.redis_password', $configs['redis']['password']);
            $loader->load('redis_services.yml');
        }

        $container->setParameter('kunstmaan_extra.bem', $configs['bem']);

        $container->setParameter('kunstmaan_node_search.search_configuration.node.class', KunstmaanExtraNodePagesConfiguration::class);
        $container->setParameter('kunstmaan_search.search.class', ChainSearchProvider::class);

        if ($configs['search']['url']) {
            $container->setParameter(CompilerPass\ElasticSearchCompilerPass::PARAM_SEARCH_URL, $configs['search']['url']);
        }

        $container->setParameter('kunstmaan_extra.search.replicas', $configs['search']['replicas']);
        $container->setParameter('kunstmaan_extra.search.shards', $configs['search']['shards']);

        $container->setParameter('kunstmaan_extra.date_formats', isset($configs['date_formats']) ? $configs['date_formats'] : []);

        if ($configs['assets']['web_prefix']) {
            $container->setParameter('kunstmaan_extra.assets.cdn_url', $configs['assets']['cdn_url']);
            $container->setParameter('kunstmaan_extra.assets.web_prefix', $configs['assets']['web_prefix']);
            $loader->load('assets.yml');
        }

        if ($configs['tinypng_api_key']) {
            $container->setParameter('kunstmaan_extra.tinypng_api_key', $configs['tinypng_api_key']);
            $loader->load('imagine_tinypng_services.yml');
        }

        if ($configs['imgix']['bucket']) {
            $container->setParameter('kunstmaan_extra.imgix_bucket', $configs['imgix']['bucket']);
            $container->setParameter('kunstmaan_extra.imgix_presets', $configs['imgix']['presets']);
            $loader->load('imagine_imgix_services.yml');
        }

        $container->setParameter('kunstmaan_extra.typography.orphans', $configs['typography']['orphans']);

        if ($configs['generate_controller']) {
            $container->setDefinition('kunstmaan_extra.typehinting_controller_cache_warmer', (new Definition)
                ->setClass(TypehintingControllerCacheWarmer::class)
                ->setArguments([new Reference('kernel'), $configs['generate_controller']])
                ->addTag('kernel.cache_warmer')
            );
        }
    }
1310150
public function load(array $configs, ContainerBuilder $container)
    {
        $container->setDefinition('urodoz_truncate', new Definition('Urodoz\Truncate\TruncateService'));
        $container->setDefinition(
            'urodoz_truncate.twig.truncateHTML',
            new Definition(
                'Urodoz\Truncate\Bridge\Twig\TruncateExtension',
                array(new Reference('urodoz_truncate'))
            )
        )->addTag('twig.extension');
    }
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');
    }
765017
public function load(array $configs, ContainerBuilder $container)
    {
        $configs[] = $this->options;
        $configuration = $this->getConfiguration($configs, $container);
        $config = $this->processConfiguration($configuration, $configs);

        $container->register('doctrine.dbal.configuration', 'Doctrine\DBAL\Configuration');

        $container->register('doctrine.dbal.database_connection', 'Doctrine\DBAL\Connection')
            ->setFactoryClass('Doctrine\DBAL\DriverManager')
            ->setFactoryMethod('getConnection')
            ->addArgument($config['database'])
            ->addArgument(new Reference('doctrine.dbal.configuration'));
    }
1184039
public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

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

        $container->setParameter(
            'twig.form.resources',
            array_merge(
                $container->hasParameter('twig.form.resources') ? $container->getParameter('twig.form.resources') : [],
                array('KunstmaanMediaBundle:Form:formWidgets.html.twig')
            )
        );
        $container->setParameter('kunstmaan_media.soundcloud_api_key', $config['soundcloud_api_key']);
        $container->setParameter('kunstmaan_media.remote_video', $config['remote_video']);
        $container->setParameter('kunstmaan_media.enable_pdf_preview', $config['enable_pdf_preview']);
        $container->setParameter('kunstmaan_media.blacklisted_extensions', $config['blacklisted_extensions']);
        $container->setParameter('kunstmaan_media.web_root', $config['web_root']);
        $container->setParameter('kunstmaan_media.full_media_path', $config['web_root'] . '%kunstmaan_media.media_path%');

        $loader->load('services.yml');
        $loader->load('handlers.yml');

        if ($config['enable_pdf_preview'] === true) {
            $loader->load('pdf_preview.yml');
        }

        $container->setParameter('liip_imagine.filter.loader.background.class', 'Kunstmaan\MediaBundle\Helper\Imagine\BackgroundFilterLoader');

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

        $container->setAlias('liip_imagine.controller', 'Kunstmaan\MediaBundle\Helper\Imagine\ImagineController')->setPublic(true);
        $container->setAlias('Liip\ImagineBundle\Controller\ImagineController', 'Kunstmaan\MediaBundle\Helper\Imagine\ImagineController')->setPublic(true);
        $container->setAlias('liip_imagine.cache.resolver.prototype.web_path', 'Kunstmaan\MediaBundle\Helper\Imagine\WebPathResolver');
        $container->setAlias('liip_imagine.cache.manager', 'Kunstmaan\MediaBundle\Helper\Imagine\CacheManager')->setPublic(true);
        $container->setAlias('liip_imagine.filter.loader.background', 'kunstmaan_media.imagine.filter.loader.background')->setPublic(true);

        $this->addAvairyApiKeyParameter($container, $config);
    }
399140
public function load(array $configs, ContainerBuilder $container): void
    {
        $processor = new Processor();
        $configuration = new Configuration();
        $config = $processor->processConfiguration($configuration, $configs);

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

        $loader->load('validators.xml');

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

        if (isset($bundles['FOSCKEditorBundle'])) {
            $loader->load('form.xml');
        }

        if (isset($bundles['SonataBlockBundle'])) {
            $loader->load('block.xml');
        }

        if (isset($bundles['SonataMediaBundle'])) {
            $loader->load('ckeditor.xml');
        }

        if (!\array_key_exists($config['default_formatter'], $config['formatters'])) {
            throw new \InvalidArgumentException(sprintf(
                'SonataFormatterBundle - Invalid default formatter: %s, available: %s',
                $config['default_formatter'],
                sprintf('["%s"]', implode('", "', array_keys($config['formatters'])))
            ));
        }

        $pool = $container->getDefinition('sonata.formatter.pool');
        $pool->addArgument($config['default_formatter']);

        foreach ($config['formatters'] as $code => $configuration) {
            if (0 === \count($configuration['extensions'])) {
                $env = null;
            } else {
                $env = new Reference($this->createEnvironment(
                    $container,
                    $code,
                    $configuration['extensions']
                ));
            }

            $pool->addMethodCall(
                'add',
                [$code, new Reference($configuration['service']), $env]
            );
        }

        $container->setParameter(
            'sonata.formatter.ckeditor.configuration.templates',
            $config['ckeditor']['templates']
        );
    }