ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Public Member Functions | |
__construct ($a_ini_file_name) | |
Constructor @access public. More... | |
read () | |
read from ini file @access public More... | |
parse () | |
load and parse an inifile @access private More... | |
fixIniFile () | |
Fix ini file (make it compatible for PHP 5.3) More... | |
write () | |
save ini-file-data to filesystem @access private More... | |
Data Fields | |
$INI_FILE_NAME = "" | |
$ERROR = "" | |
$GROUPS = array() | |
$CURRENT_GROUP = "" | |
INIFile Parser.
Early access in init proceess! Avoid further dependencies like logging or other services
Description:
A Simpe Ini File Implementation to keep settings in a simple file instead of in a DB Based upon class.INIfile.php by Mircho Mirev mirch.nosp@m.o@ma.nosp@m.cropo.nosp@m.int..nosp@m.com
Usage Examples: $ini = new IniFile("./ini.ini"); Read entire group in an associative array $grp = $ini->read_group("MAIN"); //prints the variables in the group if ($grp) for(reset($grp); $key=key($grp); next($grp)) { echo "GROUP ".$key."=".$grp[$key]."<br>"; } //set a variable to a value $ini->setVariable("NEW","USER","JOHN"); //Save the file $ini->save_data();
Definition at line 37 of file class.ilIniFile.php.
ilIniFile::__construct | ( | $a_ini_file_name | ) |
Constructor @access public.
string | name of file to be parsed |
Definition at line 73 of file class.ilIniFile.php.
References error().
ilIniFile::fixIniFile | ( | ) |
Fix ini file (make it compatible for PHP 5.3)
Definition at line 136 of file class.ilIniFile.php.
References $l.
Referenced by parse().
ilIniFile::parse | ( | ) |
load and parse an inifile @access private
Definition at line 111 of file class.ilIniFile.php.
References error(), and fixIniFile().
Referenced by read().
ilIniFile::read | ( | ) |
read from ini file @access public
Definition at line 90 of file class.ilIniFile.php.
References error(), and parse().
ilIniFile::write | ( | ) |
save ini-file-data to filesystem @access private
Definition at line 177 of file class.ilIniFile.php.
References $i, $key, $res, $result, error(), readGroup(), and readGroups().
Referenced by ilGlobalCacheSettings\writeToIniFile().
ilIniFile::$CURRENT_GROUP = "" |
Definition at line 65 of file class.ilIniFile.php.
ilIniFile::$ERROR = "" |
Definition at line 51 of file class.ilIniFile.php.
Referenced by getError().
ilIniFile::$GROUPS = array() |
Definition at line 58 of file class.ilIniFile.php.
ilIniFile::$INI_FILE_NAME = "" |
Definition at line 44 of file class.ilIniFile.php.