1 | <?php namespace Limoncello\Core\Config; |
||
26 | class ConfigManager implements ConfigManagerInterface |
||
27 | { |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $globConfigPatterns; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $globFlags = 0; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | private $configNamespace = ''; |
||
42 | |||
43 | /** |
||
44 | * @param string $globConfigPatterns |
||
45 | */ |
||
46 | 1 | public function __construct($globConfigPatterns = '*.php') |
|
51 | |||
52 | /** |
||
53 | * @inheritdoc |
||
54 | */ |
||
55 | 1 | public function loadConfigs($configNamespace, $pathToDirectory) |
|
64 | |||
65 | /** |
||
66 | * @param string $configsPath |
||
67 | * @param string $globConfigPatterns |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | 1 | protected function loadConfigsImpl($configsPath, $globConfigPatterns) |
|
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | 1 | protected function getGlobConfigPatterns() |
|
100 | |||
101 | /** |
||
102 | * @param string $globConfigPatterns |
||
103 | */ |
||
104 | 1 | protected function setGlobConfigPatterns($globConfigPatterns) |
|
109 | |||
110 | /** |
||
111 | * @return int |
||
112 | */ |
||
113 | 1 | protected function getGlobFlags() |
|
117 | |||
118 | /** |
||
119 | * @param int $globFlags |
||
120 | */ |
||
121 | 1 | protected function setGlobFlags($globFlags) |
|
126 | |||
127 | /** |
||
128 | * @return string |
||
129 | */ |
||
130 | 1 | protected function getConfigNamespace() |
|
134 | |||
135 | /** |
||
136 | * @param string $configNamespace |
||
137 | */ |
||
138 | 1 | protected function setConfigNamespace($configNamespace) |
|
143 | |||
144 | /** |
||
145 | * @return bool |
||
146 | */ |
||
147 | 1 | protected function hasConfigNamespace() |
|
151 | |||
152 | /** |
||
153 | * @param $class |
||
154 | * @param $globalConfigs |
||
155 | */ |
||
156 | 1 | private function readConfigsFromClass($class, &$globalConfigs) |
|
164 | |||
165 | /** |
||
166 | * @param $class |
||
167 | * |
||
168 | * @return bool |
||
169 | */ |
||
170 | 1 | private function isConfigClassToRead($class) |
|
181 | } |
||
182 |