src/Sulu/Bundle/LocationBundle/DependencyInjection/SuluLocationExtension.php
private function configureGeolocators($config, $container)
    {
        $geolocatorName = $config['geolocator'];
        $container->setParameter('sulu_location.geolocator.name', $geolocatorName);

        $nominatim = function($config, $container) {
            $endpoint = $config['geolocators']['nominatim']['endpoint'];
            $container->setParameter('sulu_location.geolocator.service.nominatim.endpoint', $endpoint);
        };

        $google = function($config, $container) {
            $apiKey = $config['geolocators']['google']['api_key'];
            $container->setParameter('sulu_location.geolocator.service.google.api_key', $apiKey);
        };

        $nominatim($config, $container);
        $google($config, $container);
    }
private function configureGeolocators($config, $container)
    {
        $geolocatorName = $config['geolocator'];
        $container->setParameter('sulu_location.geolocator.name', $geolocatorName);

        $nominatim = function($config, $container) {
            $endpoint = $config['geolocators']['nominatim']['endpoint'];
            $container->setParameter('sulu_location.geolocator.service.nominatim.endpoint', $endpoint);
        };

        $google = function($config, $container) {
            $apiKey = $config['geolocators']['google']['api_key'];
            $container->setParameter('sulu_location.geolocator.service.google.api_key', $apiKey);
        };

        $nominatim($config, $container);
        $google($config, $container);
    }
private function configureGeolocators ( $ config , $ container ) { $ geolocatorName = $ config [ 'geolocator' ] ; $ container -> setParameter ( 'sulu_location.geolocator.name' , $ geolocatorName ) ; $ nominatim = function ( $ config , $ container ) { $ endpoint = $ config [ 'geolocators' ] [ 'nominatim' ] [ 'endpoint' ] ; $ container -> setParameter ( 'sulu_location.geolocator.service.nominatim.endpoint' , $ endpoint ) ; } ; $ google = function ( $ config , $ container ) { $ apiKey = $ config [ 'geolocators' ] [ 'google' ] [ 'api_key' ] ; $ container -> setParameter ( 'sulu_location.geolocator.service.google.api_key' , $ apiKey ) ; } ; $ nominatim ( $ config , $ container ) ; $ google ( $ config , $ container ) ; }
Configure the geolocator services.

@param array $config - Resolved configuration
@param ContainerBuilder
Configure the geolocator services .