| Conditions | 6 |
| Paths | 24 |
| Total Lines | 27 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 26 | public function process(ContainerBuilder $container) |
||
| 27 | { |
||
| 28 | $caches = array(); |
||
| 29 | |||
| 30 | foreach ($container->findTaggedServiceIds('sonata.cache') as $id => $attributes) { |
||
| 31 | if (!$container->hasDefinition($id)) { |
||
| 32 | continue; |
||
| 33 | } |
||
| 34 | |||
| 35 | $caches[$id] = new Reference($id); |
||
| 36 | } |
||
| 37 | |||
| 38 | if ($container->hasDefinition('sonata.cache.orm.event_subscriber.default')) { |
||
| 39 | $container->getDefinition('sonata.cache.orm.event_subscriber.default') |
||
| 40 | ->replaceArgument(1, $caches); |
||
| 41 | } |
||
| 42 | |||
| 43 | if ($container->hasDefinition('sonata.cache.phpcr_odm.event_subscriber.default')) { |
||
| 44 | $container->getDefinition('sonata.cache.phpcr_odm.event_subscriber.default') |
||
| 45 | ->replaceArgument(1, $caches); |
||
| 46 | } |
||
| 47 | |||
| 48 | if ($container->hasDefinition('sonata.cache.manager')) { |
||
| 49 | $container->getDefinition('sonata.cache.manager') |
||
| 50 | ->replaceArgument(1, $caches); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |