|
ILIAS
Release_3_10_x_branch Revision 61812
|
Collaboration diagram for ilIniFile:Public Member Functions | |
| ilIniFile ($a_ini_file_name) | |
| Constructor public. | |
| read () | |
| read from ini file public | |
| parse () | |
| load and parse an inifile private | |
| parse_data ($a_data) | |
| parse data private | |
| setContent ($a_data) | |
| DESCRIPTION MISSING public. | |
| write () | |
| save ini-file-data to filesystem private | |
| show () | |
| returns the content of IniFile public | |
| getGroupCount () | |
| returns number of groups public | |
| readGroups () | |
| returns an array with the names of all the groups public | |
| groupExists ($a_group_name) | |
| checks if a group exists public | |
| readGroup ($a_group_name) | |
| returns an associative array of the variables in one group public | |
| addGroup ($a_group_name) | |
| adds a new group public | |
| removeGroup ($a_group_name) | |
| removes a group public | |
| variableExists ($a_group, $a_var_name) | |
| returns if a variable exists or not public | |
| readVariable ($a_group, $a_var_name) | |
| reads a single variable from a group public | |
| setVariable ($a_group_name, $a_var_name, $a_var_value) | |
| sets a variable in a group public | |
| error ($a_errmsg) | |
| set error message public | |
| getError () | |
| returns error public | |
Data Fields | |
| $INI_FILE_NAME = "" | |
| $ERROR = "" | |
| $GROUPS = array() | |
| $CURRENT_GROUP = "" | |
INIFile Parser.
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 mircho@macropoint.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 54 of file class.ilIniFile.php.
| ilIniFile::addGroup | ( | $a_group_name | ) |
adds a new group public
| string | group name |
Definition at line 335 of file class.ilIniFile.php.
References error(), and groupExists().
Here is the call graph for this function:| ilIniFile::error | ( | $a_errmsg | ) |
set error message public
| string |
Definition at line 421 of file class.ilIniFile.php.
Referenced by addGroup(), ilIniFile(), parse(), read(), readGroup(), readVariable(), removeGroup(), setVariable(), and write().
Here is the caller graph for this function:| ilIniFile::getError | ( | ) |
returns error public
Definition at line 433 of file class.ilIniFile.php.
References $ERROR.
| ilIniFile::getGroupCount | ( | ) |
returns number of groups public
Definition at line 274 of file class.ilIniFile.php.
| ilIniFile::groupExists | ( | $a_group_name | ) |
checks if a group exists public
| string | group name |
Definition at line 302 of file class.ilIniFile.php.
Referenced by addGroup(), readGroup(), removeGroup(), and setVariable().
Here is the caller graph for this function:| ilIniFile::ilIniFile | ( | $a_ini_file_name | ) |
Constructor public.
| string | name of file to be parsed |
Definition at line 90 of file class.ilIniFile.php.
References error().
Here is the call graph for this function:| ilIniFile::parse | ( | ) |
load and parse an inifile private
Definition at line 133 of file class.ilIniFile.php.
References error().
Referenced by read().
Here is the call graph for this function:
Here is the caller graph for this function:| ilIniFile::parse_data | ( | $a_data | ) |
parse data private
| array |
Definition at line 155 of file class.ilIniFile.php.
References $CURRENT_GROUP, and $out.
| ilIniFile::read | ( | ) |
read from ini file public
Definition at line 108 of file class.ilIniFile.php.
References error(), and parse().
Here is the call graph for this function:| ilIniFile::readGroup | ( | $a_group_name | ) |
returns an associative array of the variables in one group public
| string | group name |
Definition at line 318 of file class.ilIniFile.php.
References error(), and groupExists().
Referenced by show(), and write().
Here is the call graph for this function:
Here is the caller graph for this function:| ilIniFile::readGroups | ( | ) |
returns an array with the names of all the groups public
Definition at line 284 of file class.ilIniFile.php.
Referenced by show(), and write().
Here is the caller graph for this function:| ilIniFile::readVariable | ( | $a_group, | |
| $a_var_name | |||
| ) |
reads a single variable from a group public
| string | group name |
| string | value |
Definition at line 385 of file class.ilIniFile.php.
References error().
Here is the call graph for this function:| ilIniFile::removeGroup | ( | $a_group_name | ) |
removes a group public
| string | group name |
Definition at line 353 of file class.ilIniFile.php.
References error(), and groupExists().
Here is the call graph for this function:| ilIniFile::setContent | ( | $a_data | ) |
DESCRIPTION MISSING public.
| string |
Definition at line 174 of file class.ilIniFile.php.
| ilIniFile::setVariable | ( | $a_group_name, | |
| $a_var_name, | |||
| $a_var_value | |||
| ) |
sets a variable in a group public
| string | |
| string | |
| string |
Definition at line 404 of file class.ilIniFile.php.
References error(), and groupExists().
Here is the call graph for this function:| ilIniFile::show | ( | ) |
returns the content of IniFile public
Definition at line 235 of file class.ilIniFile.php.
References readGroup(), and readGroups().
Here is the call graph for this function:| ilIniFile::variableExists | ( | $a_group, | |
| $a_var_name | |||
| ) |
returns if a variable exists or not public
| string | group name |
| string | value |
Definition at line 372 of file class.ilIniFile.php.
| ilIniFile::write | ( | ) |
save ini-file-data to filesystem private
Definition at line 185 of file class.ilIniFile.php.
References $res, $result, error(), readGroup(), and readGroups().
Here is the call graph for this function:| ilIniFile::$CURRENT_GROUP = "" |
Definition at line 82 of file class.ilIniFile.php.
Referenced by parse_data().
| ilIniFile::$ERROR = "" |
Definition at line 68 of file class.ilIniFile.php.
Referenced by getError().
| ilIniFile::$GROUPS = array() |
Definition at line 75 of file class.ilIniFile.php.
| ilIniFile::$INI_FILE_NAME = "" |
Definition at line 61 of file class.ilIniFile.php.