Adds services tagged 'nested_matcher' to the tagged_matcher service.
Expanded class hierarchy of RegisterNestedMatchersPass
class RegisterNestedMatchersPass implements CompilerPassInterface {
/**
* Adds services tagged 'nested_matcher' to the tagged_matcher service.
*
* @param \Symfony\Component\DependencyInjection\ContainerBuilder $container
* The container to 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),
));
}
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RegisterNestedMatchersPass:: |
public | function |
Adds services tagged 'nested_matcher' to the tagged_matcher service. Overrides CompilerPassInterface:: |