utility class to read and modify two ini files at the same time : one master file, and one file which overrides values of the master file, like we have in jelix with mainconfig.ini.php and config.ini.php of an entry point
| package |
jelix |
|---|---|
| subpackage |
utils |
| since | 1.1 |
__construct(\jIniFileModifier|string $master, \jIniFileModifier|string $overrider)
getOverrider() : \jIniFileModifier
getValue(string $name, string $section, string $key = null, boolean $masterOnly = false) : mixed
stringthe name of the option to retrieve
stringthe section where the option is. 0 is the global section
stringfor option which is an item of array, the key in the array
booleanif true, get the value from the master file, else get the value from the overrider file or from the master file if the value doesn't exists in the overrider file (default)
mixedthe value
isModified() : boolean
| since | 1.2 |
|---|---|
boolean
removeValue( $name, $section, $key = null, $removePreviousComment = true, $masterOnly = false)
save( $chmod = null)
setValue(string $name, string $value, string $section, string $key = null, boolean $master = false)
stringthe name of the option to modify
stringthe new value
stringthe section where to set the item. 0 is the global section
stringfor option which is an item of array, the key in the array
booleanif true, change the value in the master file, else change the value in the overrider file (default)
setValues( $values, $section, $onMaster = false)