Conditions | 4 |
Paths | 4 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
24 | public function process(ContainerBuilder $container){ |
||
25 | if (!$container->hasDefinition(ParserChainInterface::SERVICE_ID)) { |
||
26 | return; |
||
27 | } |
||
28 | |||
29 | $definition = $container->getDefinition(ParserChainInterface::SERVICE_ID); |
||
30 | |||
31 | $taggedServices = $container->findTaggedServiceIds(MediaParserInterface::SERVICE_TAG); |
||
32 | |||
33 | foreach ($taggedServices as $id => $tagAttributes) { |
||
34 | foreach ($tagAttributes as $attributes) { |
||
35 | $definition->addMethodCall( |
||
36 | 'addParser', |
||
37 | array(new Reference($id)) |
||
38 | ); |
||
39 | } |
||
40 | } |
||
41 | } |
||
42 | } |
||
43 |