1 | <?php |
||
8 | class ConfigurationLoader |
||
9 | { |
||
10 | /** |
||
11 | * @var string |
||
12 | */ |
||
13 | protected $rootDirectory; |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | protected $configFilepath; |
||
19 | |||
20 | /** |
||
21 | * @var string |
||
22 | */ |
||
23 | protected $filename; |
||
24 | |||
25 | /** |
||
26 | * @param string $rootDirectory Directory containing the config file |
||
27 | * @param string $filename Configuration file name |
||
28 | */ |
||
29 | public function __construct($rootDirectory, $filename) |
||
34 | |||
35 | /** |
||
36 | * Read the config file and return the configuration array. |
||
37 | * |
||
38 | * @return array The configuration |
||
39 | */ |
||
40 | public function loadConfiguration() |
||
52 | |||
53 | /** |
||
54 | * @return string The configuration filepath |
||
55 | */ |
||
56 | public function getConfigurationFilepath() |
||
60 | |||
61 | /** |
||
62 | * @param $configFilepath string The configuration filepath |
||
63 | */ |
||
64 | public function setConfigurationFilepath($configFilepath) |
||
68 | |||
69 | /** |
||
70 | * @return string The root directory |
||
71 | */ |
||
72 | public function getRootDirectory() |
||
76 | |||
77 | /** |
||
78 | * @param string $rootDirectory The root directory |
||
79 | */ |
||
80 | public function setRootDirectory($rootDirectory) |
||
84 | } |
||
85 |