ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Public Member Functions | |
ilIniFile ($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... | |
parse_data ($a_data) | |
parse data @access private More... | |
setContent ($a_data) | |
DESCRIPTION MISSING @access public. 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::fixIniFile | ( | ) |
Fix ini file (make it compatible for PHP 5.3)
Definition at line 144 of file class.ilIniFile.php.
References $l.
Referenced by parse().
ilIniFile::ilIniFile | ( | $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::parse | ( | ) |
load and parse an inifile @access private
Definition at line 116 of file class.ilIniFile.php.
References error(), and fixIniFile().
Referenced by read().
ilIniFile::parse_data | ( | $a_data | ) |
parse data @access private
array |
Definition at line 192 of file class.ilIniFile.php.
References $CURRENT_GROUP, and $out.
ilIniFile::read | ( | ) |
read from ini file @access public
Definition at line 91 of file class.ilIniFile.php.
References error(), and parse().
ilIniFile::setContent | ( | $a_data | ) |
DESCRIPTION MISSING @access public.
string |
Definition at line 211 of file class.ilIniFile.php.
ilIniFile::write | ( | ) |
save ini-file-data to filesystem @access private
Definition at line 222 of file class.ilIniFile.php.
References $res, $result, error(), readGroup(), and readGroups().
Referenced by ilGlobalCacheSettings\writeToIniFile().
ilIniFile::$CURRENT_GROUP = "" |
Definition at line 65 of file class.ilIniFile.php.
Referenced by parse_data().
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.