| Total Complexity | 3 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 17 | class ArrayConfig extends AbstractConfig |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * The array containing comnfiguartion data can directly be passed to the constructor. |
||
| 21 | * Addition data can be passed with the addValue() and addConfig() methods. |
||
| 22 | * @param array $aConfig |
||
| 23 | */ |
||
| 24 | public function __construct(array $aConfig = []) |
||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Add additional data to the current config. |
||
| 31 | * <b>Note: This method uses the php array_merge() function! </b><br/> |
||
| 32 | * If the additional data contains section(s) the current config at least |
||
| 33 | * contains, the complete section is overwritten! <br/> |
||
| 34 | * If you want to 'realy' merge two configurations, you have to use separate |
||
| 35 | * instances and use the mergeWith() method! |
||
| 36 | * @param array $aConfig |
||
| 37 | */ |
||
| 38 | public function addConfig(array $aConfig) : void |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Add new value to the config. |
||
| 45 | * @param string $strName |
||
| 46 | * @param mixed $value |
||
| 47 | */ |
||
| 48 | public function setValue(string $strName, $value) : void |
||
| 53 |