private function generateServices(array $services, ContainerBuilder $container)
    {
        foreach ($services as $serviceName => $service) {
            $serviceId = 'bridge.'.$serviceName;

            $serviceDefinition = $this->createComponentDefinition($serviceName, $service['class'], $service['options']);
            $serviceDefinition->addMethodCall('setEventDispatcher', array(new Reference('bridge.event_dispatcher')));
            $serviceDefinition->addMethodCall('setRegistry', array(new Reference('bridge.registry')));

            $this->generateGroups($service['groups'], $serviceId, $serviceDefinition, $container);

            $container->setDefinition($serviceId, $serviceDefinition);

            $container
                ->getDefinition('bridge.registry')
                ->addMethodCall('addService', array(new Reference($serviceId)));
        }
    }