hasDefinition('mactronique_cache.phpcache')) { return; } $definition = $container->getDefinition( 'mactronique_cache.phpcache' ); $taggedServices = $container->findTaggedServiceIds( 'mactronique_cache.driver' ); foreach ($taggedServices as $id => $attributes) { $definition->addMethodCall( 'registerDriver', array(new Reference($id)) ); } } }