| Conditions | 2 |
| Paths | 2 |
| Total Lines | 16 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 20 | public function load(array $config, ContainerBuilder $container) |
||
| 21 | { |
||
| 22 | $definition = new Definition( |
||
| 23 | Utility::getLibraryClass('Metadata\MetadataFactory'), |
||
| 24 | [ |
||
| 25 | new Reference(Utility::getAliasedName('metadata.default_driver')), |
||
| 26 | new Reference(Utility::getAliasedName('util.entity')), |
||
| 27 | ] |
||
| 28 | ); |
||
| 29 | |||
| 30 | if (true === $config['metadata']['cache']['enabled']) { |
||
| 31 | $definition->addMethodCall('setCache', [new Reference(Utility::getAliasedName('metadata.cache'))]); |
||
| 32 | } |
||
| 33 | $container->setDefinition(Utility::getAliasedName('metadata.factory'), $definition); |
||
| 34 | return $this; |
||
| 35 | } |
||
| 36 | } |
||
| 37 |