| Conditions | 3 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function process(ContainerBuilder $container) |
||
| 19 | { |
||
| 20 | /* |
||
| 21 | * Register Controllers from controllers service |
||
| 22 | */ |
||
| 23 | $container->get('majima.controllers')->registerControllers($container); |
||
| 24 | |||
| 25 | $configPath = BASE_DIR . join(DIRECTORY_SEPARATOR, ['var', 'conf', 'config.json']); |
||
|
|
|||
| 26 | |||
| 27 | if (!file_exists($configPath)) { |
||
| 28 | return; |
||
| 29 | } |
||
| 30 | |||
| 31 | $config = json_decode(file_get_contents($configPath)); |
||
| 32 | |||
| 33 | foreach ($config as $key => $value) { |
||
| 34 | $container->setParameter($key, $value); |
||
| 35 | } |
||
| 36 | $container->setParameter('db_config_loaded', true); |
||
| 37 | } |
||
| 38 | } |