1 | <?php |
||
16 | class Properties |
||
17 | { |
||
18 | protected $data; |
||
19 | |||
20 | /** |
||
21 | * Load default configuration |
||
22 | * @throws NativeException |
||
23 | */ |
||
24 | public function __construct() |
||
30 | |||
31 | /** |
||
32 | * Load configurations from file in /Private/Config/ |
||
33 | * @param string $configName |
||
34 | * @param bool $overload |
||
35 | * @return bool |
||
36 | */ |
||
37 | private function load($configName, $overload = false) |
||
53 | |||
54 | /** |
||
55 | * Get config value by config key from configuration file |
||
56 | * @param string $configKey |
||
57 | * @param string $configFile |
||
58 | * @param bool|false $parseType |
||
59 | * @return mixed |
||
60 | */ |
||
61 | public function get($configKey, $configFile = 'default', $parseType = false) |
||
97 | |||
98 | /** |
||
99 | * Get all configuration data of selected file |
||
100 | * @param string $configFile |
||
101 | * @return bool|array |
||
102 | */ |
||
103 | public function getAll($configFile = 'default') |
||
112 | |||
113 | /** |
||
114 | * Update configuration data based on key-value array of new data. Do not pass multi-level array on new position without existing keys |
||
115 | * @param string $configFile |
||
116 | * @param array $newData |
||
117 | * @return bool |
||
118 | */ |
||
119 | public function updateConfig($configFile, array $newData) |
||
129 | |||
130 | /** |
||
131 | * Write configurations data from array to cfg file |
||
132 | * @param string $configFile |
||
133 | * @param array $data |
||
134 | * @return bool |
||
135 | */ |
||
136 | public function writeConfig($configFile, array $data) |
||
148 | } |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: