OXID eShop CE  4.8.11
 All Classes Files Functions Variables Pages
OxConfigFile Class Reference

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$sFileNameConfiguration 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$sFileNameConfiguration file name
Returns
null

Definition at line 18 of file oxconfigfile.php.

OxConfigFile::getVar (   $sVarName)

Returns loaded variable value by name.

Parameters
string$sVarNameVariable 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$sVarNameVariable name
Returns
bool

Definition at line 69 of file oxconfigfile.php.

OxConfigFile::setFile (   $sFileName)

Sets custom config file to include

Parameters
string$sFileNamecustom configuration file name
Returns
null

Definition at line 93 of file oxconfigfile.php.

OxConfigFile::setVar (   $sVarName,
  $sValue 
)

Set config variable.

Parameters
string$sVarNameVariable name
string$sValueVariable value
Returns
null

Definition at line 57 of file oxconfigfile.php.


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