Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
13 | public function process(ContainerBuilder $container) |
||
14 | { |
||
15 | if (!$container->hasDefinition($this->entityManagerService)) { |
||
16 | return; |
||
17 | } |
||
18 | $definition = $container->getDefinition($this->entityManagerService); |
||
19 | $taggedServices = $container->findTaggedServiceIds('ezobject_wrapper.repository'); |
||
20 | foreach ($taggedServices as $id => $tags) { |
||
21 | foreach ($tags as $attributes) { |
||
22 | /// @todo validate the keys in $attributes, for courtesy to users |
||
23 | $definition->addMethodCall( |
||
24 | 'registerService', |
||
25 | array(new Reference($id), @$attributes["content_type"]) |
||
26 | ); |
||
27 | } |
||
28 | } |
||
29 | } |
||
30 | } |
||
31 |