protected function loadInternal(array $configs, ContainerBuilder $container)
    {
        $parameters = $this->flattenParametersFromConfig($container, $configs, 'vm_pro_api');
        foreach ($parameters as $key => $value) {
            $container->setParameter($key, $value);
        }

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

        // Always load the services that will always be the same
        $loader->load('services/main.yml');

        // only load ratings service if the meta data fields are configured
        if (array_key_exists('vm_pro_api_rating_meta_data_fields_average', $parameters)
            && array_key_exists('vm_pro_api_rating_meta_data_fields_count', $parameters)) {
            $loader->load('services/ratings.yml');
        }

        // Dynamically load service configurations that are specific
        // to which Guzzle version is installed
        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
            $loader->load('services/guzzle6.yml');
        } else {
            $loader->load('services/guzzle5.yml');
        }

        if (version_compare(Kernel::VERSION, '3.3', '>=')) {
            $loader->load('services/symfony3.yml');
        }
    }
protected function loadInternal(array $configs, ContainerBuilder $container)
    {
        $parameters = $this->flattenParametersFromConfig($container, $configs, 'vm_pro_api');
        foreach ($parameters as $key => $value) {
            $container->setParameter($key, $value);
        }

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

        // Always load the services that will always be the same
        $loader->load('services/main.yml');

        // only load ratings service if the meta data fields are configured
        if (array_key_exists('vm_pro_api_rating_meta_data_fields_average', $parameters)
            && array_key_exists('vm_pro_api_rating_meta_data_fields_count', $parameters)) {
            $loader->load('services/ratings.yml');
        }

        // Dynamically load service configurations that are specific
        // to which Guzzle version is installed
        if (version_compare(ClientInterface::VERSION, '6.0', '>=')) {
            $loader->load('services/guzzle6.yml');
        } else {
            $loader->load('services/guzzle5.yml');
        }

        if (version_compare(Kernel::VERSION, '3.3', '>=')) {
            $loader->load('services/symfony3.yml');
        }
    }
protected function loadInternal ( array $ configs , ContainerBuilder $ container ) { $ parameters = $ this -> flattenParametersFromConfig ( $ container , $ configs , 'vm_pro_api' ) ; foreach ( $ parameters as $ key => $ value ) { $ container -> setParameter ( $ key , $ value ) ; } $ loader = new YamlFileLoader ( $ container , new FileLocator ( __DIR__ . '/../Resources/config' ) ) ; // Always load the services that will always be the same $ loader -> load ( 'services/main.yml' ) ; // only load ratings service if the meta data fields are configured if ( array_key_exists ( 'vm_pro_api_rating_meta_data_fields_average' , $ parameters ) && array_key_exists ( 'vm_pro_api_rating_meta_data_fields_count' , $ parameters ) ) { $ loader -> load ( 'services/ratings.yml' ) ; } // Dynamically load service configurations that are specific // to which Guzzle version is installed if ( version_compare ( ClientInterface :: VERSION , '6.0' , '>=' ) ) { $ loader -> load ( 'services/guzzle6.yml' ) ; } else { $ loader -> load ( 'services/guzzle5.yml' ) ; } if ( version_compare ( Kernel :: VERSION , '3.3' , '>=' ) ) { $ loader -> load ( 'services/symfony3.yml' ) ; } }
Load the appropriate service container configurations based on which
GuzzleHttp library is present in the project.

@param array            $configs
@param ContainerBuilder $container
Load the appropriate service container configurations based on which GuzzleHttp library is present in the project .