| ILIAS
    Release_4_3_x_branch Revision 61807
    | 
 Collaboration diagram for ilIniFile:
 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 | |
| fixIniFile () | |
| Fix ini file (make it compatible for PHP 5.3) | |
| 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 34 of file class.ilIniFile.php.
| ilIniFile::addGroup | ( | $a_group_name | ) | 
adds a new group public
| string | group name | 
Definition at line 369 of file class.ilIniFile.php.
References error(), and groupExists().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::error | ( | $a_errmsg | ) | 
set error message public
| string | 
Definition at line 455 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:
 Here is the caller graph for this function:| ilIniFile::fixIniFile | ( | ) | 
Fix ini file (make it compatible for PHP 5.3)
Definition at line 141 of file class.ilIniFile.php.
Referenced by parse().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| ilIniFile::getError | ( | ) | 
returns error public
Definition at line 467 of file class.ilIniFile.php.
References $ERROR.
| ilIniFile::getGroupCount | ( | ) | 
returns number of groups public
Definition at line 308 of file class.ilIniFile.php.
| ilIniFile::groupExists | ( | $a_group_name | ) | 
checks if a group exists public
| string | group name | 
Definition at line 336 of file class.ilIniFile.php.
Referenced by addGroup(), readGroup(), removeGroup(), and setVariable().
 Here is the caller graph for this function:
 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 70 of file class.ilIniFile.php.
References error().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::parse | ( | ) | 
load and parse an inifile private
Definition at line 113 of file class.ilIniFile.php.
References error(), and fixIniFile().
Referenced by read().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| ilIniFile::parse_data | ( | $a_data | ) | 
parse data private
| array | 
Definition at line 189 of file class.ilIniFile.php.
References $CURRENT_GROUP, and $out.
| ilIniFile::read | ( | ) | 
read from ini file public
Definition at line 88 of file class.ilIniFile.php.
References error(), and parse().
 Here is the call graph for this function:
 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 352 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 call graph for this function: Here is the caller 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 318 of file class.ilIniFile.php.
Referenced by show(), and write().
 Here is the caller graph for this function:
 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 419 of file class.ilIniFile.php.
References error().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::removeGroup | ( | $a_group_name | ) | 
removes a group public
| string | group name | 
Definition at line 387 of file class.ilIniFile.php.
References error(), and groupExists().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::setContent | ( | $a_data | ) | 
DESCRIPTION MISSING public.
| string | 
Definition at line 208 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 438 of file class.ilIniFile.php.
References error(), and groupExists().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::show | ( | ) | 
returns the content of IniFile public
Definition at line 269 of file class.ilIniFile.php.
References readGroup(), and readGroups().
 Here is the call graph for this function:
 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 406 of file class.ilIniFile.php.
| ilIniFile::write | ( | ) | 
save ini-file-data to filesystem private
Definition at line 219 of file class.ilIniFile.php.
References $res, $result, error(), readGroup(), and readGroups().
 Here is the call graph for this function:
 Here is the call graph for this function:| ilIniFile::$CURRENT_GROUP = "" | 
Definition at line 62 of file class.ilIniFile.php.
Referenced by parse_data().
| ilIniFile::$ERROR = "" | 
Definition at line 48 of file class.ilIniFile.php.
Referenced by getError().
| ilIniFile::$GROUPS = array() | 
Definition at line 55 of file class.ilIniFile.php.
| ilIniFile::$INI_FILE_NAME = "" | 
Definition at line 41 of file class.ilIniFile.php.