| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | public function load(array $configs, ContainerBuilder $container) |
||
| 13 | { |
||
| 14 | $configuration = new Configuration(); |
||
| 15 | $config = $this->processConfiguration($configuration, $configs); |
||
| 16 | |||
| 17 | $loader = new Loader\XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); |
||
| 18 | $loader->load('services.xml'); |
||
| 19 | |||
| 20 | $locator = $container->getDefinition('psi_object_render.template.locator'); |
||
| 21 | |||
| 22 | // sort by namespace length |
||
| 23 | $mapping = $config['mapping']; |
||
| 24 | uksort($mapping, function ($one, $two) { |
||
| 25 | return strlen($two) - strlen($one); |
||
| 26 | }); |
||
| 27 | $locator->replaceArgument(0, $mapping); |
||
| 28 | } |
||
| 29 | } |
||
| 30 |