Public Member Functions | |
| ConfigParser () | |
| getFileContents () | |
| & | readConfig ($file) |
| updateConfig ($file, $params) | |
| writeConfig ($file) | |
Public Attributes | |
| $content | |
Definition at line 18 of file ConfigParser.inc.php.
| ConfigParser.ConfigParser | ( | ) |
Constructor.
Definition at line 26 of file ConfigParser.inc.php.
| ConfigParser.getFileContents | ( | ) |
Return the contents of the current config file.
Definition at line 214 of file ConfigParser.inc.php.
| & ConfigParser.readConfig | ( | $ | file | ) |
Read a configuration file into a multidimensional array. This is a replacement for the PHP parse_ini_file function, which does not type setting values.
| $file | string full path to the config file |
Definition at line 35 of file ConfigParser.inc.php.
Referenced by Config.reloadData().
| ConfigParser.updateConfig | ( | $ | file, | |
| $ | params | |||
| ) |
Read a configuration file and update variables. This method stores the updated configuration but does not write it out. Use writeConfig() or getFileContents() afterwards to do something with the new config.
| $file | string full path to the config file | |
| $params | array an associative array of configuration parameters to update. If the value is an associative array (of variable name/value pairs) instead of a scalar, the key is treated as a section instead of a variable. Parameters not in $params remain unchanged |
Definition at line 132 of file ConfigParser.inc.php.
| ConfigParser.writeConfig | ( | $ | file | ) |
Write contents of current config file
| $file | string full path to output file |
Definition at line 193 of file ConfigParser.inc.php.
| ConfigParser.$content |
Contents of the config file currently being parsed
Definition at line 21 of file ConfigParser.inc.php.
1.5.6