A PHP class to handle .ini files
Include the class file to your PHP file and create a class instance to get and/or set data to an ini file.
Make sure your the destination directory or your ini file is CHMOD properly.
construct($name)
Construct class and check independencies
param $name (string) Relative path for (new) ini file, empty = random name. (default: null)
return (bool) Successful
destruct()
Desctruct class and clean up.
return (null)
deleteGroup($group)
Delete a group of settings
param $group (string) Name of the group to delete (default: null)
return (bool) Successful
deleteSetting($setting, $group)
Delete a setting
param $setting (string) Name of the setting to delete (default: null)
param $group (string) if setting is in a group, name of the group (default: null)
return (bool) Successful
getAllSettings()
Get array with all settings from ini file
return (array) All settings
getFileName()
Get name and path of ini file
return (string) Ini file name
getGroup($group)
Gat array with all settings of a group
param $group (string) Name of the group (default: null)
return (array) All settings from $group
getSetting($setting, $group)
Get a setting
param $setting (string) Name of the setting (default: null)
param $group (string) if setting is in a group, name of the group (default: null)
return (string) Requested setting
saveIniFile()
Save settings to ini file
return (bool) Successful
setSetting($setting, $value, $group)
Set a setting or create setting (and group) if it doesn't exist
param $setting (string) Name for the setting
param $value (string) Setting value
param $group (string) Name of group, empty = no group (default: null)
return (bool) Successful
getVersion()
Get current class version
return (string) Current class version