private function overrideServices(ContainerBuilder $container, array $services)
    {
        $serviceConfig = array(
            'auth_handler' => 'ma27_api_key_authentication.auth_handler',
            'key_factory'  => 'ma27_api_key_authentication.key_factory',
        );

        foreach ($serviceConfig as $configIndex => $replaceableServiceId) {
            if (!isset($services[$configIndex]) || null === $serviceId = $services[$configIndex]) {
                continue;
            }

            $container->removeDefinition($replaceableServiceId);
            $container->setAlias($replaceableServiceId, new Alias($serviceId));
        }
    }
private function overrideServices(ContainerBuilder $container, array $services)
    {
        $serviceConfig = array(
            'auth_handler' => 'ma27_api_key_authentication.auth_handler',
            'key_factory'  => 'ma27_api_key_authentication.key_factory',
        );

        foreach ($serviceConfig as $configIndex => $replaceableServiceId) {
            if (!isset($services[$configIndex]) || null === $serviceId = $services[$configIndex]) {
                continue;
            }

            $container->removeDefinition($replaceableServiceId);
            $container->setAlias($replaceableServiceId, new Alias($serviceId));
        }
    }
private function overrideServices ( ContainerBuilder $ container , array $ services ) { $ serviceConfig = array ( 'auth_handler' => 'ma27_api_key_authentication.auth_handler' , 'key_factory' => 'ma27_api_key_authentication.key_factory' , ) ; foreach ( $ serviceConfig as $ configIndex => $ replaceableServiceId ) { if ( ! isset ( $ services [ $ configIndex ] ) || null === $ serviceId = $ services [ $ configIndex ] ) { continue ; } $ container -> removeDefinition ( $ replaceableServiceId ) ; $ container -> setAlias ( $ replaceableServiceId , new Alias ( $ serviceId ) ) ; } }
Processes the service override configuration into the container.

@param ContainerBuilder $container
@param array            $services
Processes the service override configuration into the container .