Total Complexity | 4 |
Total Lines | 38 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | class ConfigurationManager |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $configurationFile; |
||
21 | |||
22 | public function __construct($filePath) { |
||
23 | $this->configurationFile = $filePath; |
||
24 | } |
||
25 | /** |
||
26 | * @return string |
||
27 | */ |
||
28 | public function getConfigurationFile() |
||
29 | { |
||
30 | return $this->configurationFile; |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * @return array |
||
35 | */ |
||
36 | public function load() { |
||
37 | // TODO check exception behavior |
||
38 | $configuration = Yaml::parse(file_get_contents($this->configurationFile)); |
||
39 | |||
40 | return $this->check($configuration); |
||
41 | } |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @param $configurationUnprocessed |
||
46 | * @return array |
||
47 | */ |
||
48 | private function check($configurationUnprocessed) { |
||
53 | } |
||
54 | } |