Open Journal Systems
3.3.0
|
Public Member Functions | |
__construct () | |
getFileContents () | |
updateConfig ($file, $params) | |
writeConfig ($file) | |
Static Public Member Functions | |
static & | readConfig ($file) |
Data Fields | |
$content | |
Class for parsing and modifying php.ini style configuration files.
Definition at line 17 of file ConfigParser.inc.php.
ConfigParser::__construct | ( | ) |
Constructor.
Definition at line 25 of file ConfigParser.inc.php.
ConfigParser::getFileContents | ( | ) |
Return the contents of the current config file.
Definition at line 213 of file ConfigParser.inc.php.
References $content.
|
static |
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 34 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 131 of file ConfigParser.inc.php.
ConfigParser::writeConfig | ( | $file | ) |
Write contents of current config file
$file | string full path to output file |
Definition at line 192 of file ConfigParser.inc.php.
ConfigParser::$content |
Contents of the config file currently being parsed
Definition at line 20 of file ConfigParser.inc.php.
Referenced by getFileContents().