Adds services tagged 'nested_matcher' to the tagged_matcher service.
\Symfony\Component\DependencyInjection\ContainerBuilder $container: The container to process.
Overrides CompilerPassInterface::process
public function process(ContainerBuilder $container) {
if (!$container
->hasDefinition('nested_matcher')) {
return;
}
$nested = $container
->getDefinition('nested_matcher');
foreach ($container
->findTaggedServiceIds('nested_matcher') as $id => $attributes) {
$method = $attributes[0]['method'];
$nested
->addMethodCall($method, array(
new Reference($id),
));
}
}