Public Member Functions | Private Member Functions

OxConfigFile Class Reference

List of all members.

Public Member Functions

 __construct ($sFileName)
 getVar ($sVarName)
 setVar ($sVarName, $sValue)
 isVarSet ($sVarName)
 getVars ()
 setFile ($sFileName)

Private Member Functions

 _loadVars ($sFileName)

Detailed Description

Wraps and provides getters for configuration constants stored in configuration file (usually config.inc.php).

Definition at line 6 of file oxconfigfile.php.


Constructor & Destructor Documentation

OxConfigFile.__construct ( sFileName  ) 

Initializes the instance. Loads config variables from the file.

Parameters:
string $sFileName Configuration file name

Definition at line 28 of file oxconfigfile.php.


Member Function Documentation

OxConfigFile._loadVars ( sFileName  )  [private]

Performs variable loading from configuration file by including the php file. It works with current configuration file format well, however in case the variable storage format is not satisfactory this method is a subject to be changed.

Parameters:
string $sFileName Configuration file name
Returns:
null

Definition at line 18 of file oxconfigfile.php.

OxConfigFile.getVar ( sVarName  ) 

Returns loaded variable value by name.

Parameters:
string $sVarName Variable name
Returns:
mixed

Definition at line 40 of file oxconfigfile.php.

OxConfigFile.getVars (  ) 

Returns all loaded vars as an array

Returns:
array[string]mixed

Definition at line 79 of file oxconfigfile.php.

OxConfigFile.isVarSet ( sVarName  ) 

Checks by name if variable is set

Parameters:
string $sVarName Variable name
Returns:
bool

Definition at line 69 of file oxconfigfile.php.

OxConfigFile.setFile ( sFileName  ) 

Sets custom config file to include

Parameters:
string $sFileName custom configuration file name
Returns:
null

Definition at line 93 of file oxconfigfile.php.

OxConfigFile.setVar ( sVarName,
sValue 
)

Set config variable.

Parameters:
string $sVarName Variable name
string $sValue Variable value
Returns:
null

Definition at line 57 of file oxconfigfile.php.


The documentation for this class was generated from the following file: