PHP Class CampConfig

Mostrar archivo Open project: sourcefabric/newscoop Class Usage Examples

Public Methods

Method Description
TranslateSettingName ( $p_varName ) : mixed Translates the given setting variable name into the form namespace and var name.
getAllSettings ( ) : array Gets all the configuration settings
getSetting ( $p_varName ) : mixed Gets a setting var value from configuration.
singleton ( string $p_configFile = null ) : object Builds an instance object of this class only if there is no one.

Private Methods

Method Description
__construct ( string $p_configFile = null ) Class constructor

Method Details

TranslateSettingName() public static method

Translates the given setting variable name into the form namespace and var name.
public static TranslateSettingName ( $p_varName ) : mixed
return mixed null If the given value is not appropriate settingVar An array containing the namespace and variable actual name

getAllSettings() public method

Gets all the configuration settings
public getAllSettings ( ) : array
return array m_config The array of settings

getSetting() public method

Gets a setting var value from configuration.
public getSetting ( $p_varName ) : mixed
$p_varName The name of the setting variable
return mixed null Var name passed is no valid mixed The value of the setting variable

singleton() public static method

Builds an instance object of this class only if there is no one.
public static singleton ( string $p_configFile = null ) : object
$p_configFile string The full path to the configuration file
return object $m_instance The CampConfig instance