| Total Complexity | 8 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | class IniConfigLoader extends AbstractConfigLoader |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * Load routes data from file |
||
| 27 | * |
||
| 28 | * return array |
||
| 29 | */ |
||
| 30 | 8 | public function load() |
|
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * Build array parameters |
||
| 46 | * |
||
| 47 | * @param array &$config |
||
| 48 | */ |
||
| 49 | 8 | protected function buildTree(array &$config) |
|
| 50 | { |
||
| 51 | 8 | foreach ($config as $name => $value) { |
|
| 52 | 8 | $params = explode('.', $name); |
|
| 53 | |||
| 54 | 8 | if (1 === count($params)) { |
|
| 55 | 8 | continue; |
|
| 56 | } |
||
| 57 | |||
| 58 | 8 | $this->processConfig($config, $params, $value); |
|
| 59 | |||
| 60 | 8 | unset($config[$name]); |
|
| 61 | } |
||
| 62 | 8 | } |
|
| 63 | |||
| 64 | /** |
||
| 65 | * Processing config line |
||
| 66 | * |
||
| 67 | * @param array $config |
||
| 68 | * @param array $params |
||
| 69 | * @param string $value |
||
| 70 | */ |
||
| 71 | 8 | protected function processConfig(array &$config, array $params, $value) |
|
| 83 | } |
||
| 84 | 8 | } |
|
| 86 |