Class configfile

Description

A generic system configuration file. Extend this for particular types of config file, such as .INI, shell definitions etc. Automatically calls the import_settings() method on instantiation.

Located in /file-defs.php (line 1050)


	
			
Direct descendents
Class Description
 class shellconfigfile A system configuration file in the form of a shell script. These are in the standard NAME=VALUE format, but implemented as 'sh' scripts so that other scripts can use them via '.'. This class is provided to allow Php scripts to easily access the config settings in these too.
 class iniconfigfile A system configuration file in the form of an INI file. These are in the standard NAME=VALUE format, within sections. In this class we ignore the [sections], and just read in all of the NAME=VALUE pairs, stashing them into the 'settings' class var as an array.
Variable Summary
 mixed $path
 mixed $settings
 mixed $valid
Method Summary
 configfile configfile (mixed $path)
 void getvalue (mixed $name)
 void import_settings ()
 void settingexists (mixed $name)
 void settingscount ()
Variables
mixed $path (line 1052)

Path to the config file

mixed $settings = array() (line 1054)

Config settings as an associative array (name=value)

mixed $valid = false (line 1056)

True if config is read in & valid

Methods
Constructor configfile (line 1059)
configfile configfile (mixed $path)
getvalue (line 1066)

Return value of named setting, if it exists..

void getvalue (mixed $name)
import_settings (line 1091)

This will be implemented in the child class depending on config file type.

void import_settings ()

Redefined in descendants as:
settingexists (line 1076)

Return true if named setting is defined

void settingexists (mixed $name)
settingscount (line 1082)

Return number of config settings

void settingscount ()

Documentation generated by phpDocumentor 1.3.0RC3