PHP Class ModuleConfiguration

Show file Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_directory
$m_moduleName
$m_variables
$m_variablesList

Public Methods

Method Description
ModuleConfiguration ( $module_name = "", $directory = "" )
configurationFileName ( string $p_moduleName = "" ) : string Return configuration file name of a given module
configurationFilePath ( string $p_moduleName = "", string $p_directory = "" ) : string Return configuration file path of a given module, directory
create ( string $p_moduleName, array $p_variables ) Create a module configuration object for a given module name and array of variables
moduleName ( ) : string Return the module name
read ( string $p_moduleName, string $p_directory ) Read the configuration file corresponding to a specific module
save ( string $p_destDirectory = "" ) Save the configuration file corresponding to module object
setValueOf ( string $p_variableName, string $p_value ) : boolean Set the value of a given variable
validModuleName ( string &$p_moduleName ) : boolean Return the true if the module name was valid
valueOf ( string $p_variableName ) : string Return the value of a given variable
variablesList ( ) : array Return the variables list as array

Method Details

ModuleConfiguration() public method

public ModuleConfiguration ( $module_name = "", $directory = "" )

configurationFileName() public method

Return configuration file name of a given module
public configurationFileName ( string $p_moduleName = "" ) : string
$p_moduleName string
return string or false in case of error

configurationFilePath() public method

Return configuration file path of a given module, directory
public configurationFilePath ( string $p_moduleName = "", string $p_directory = "" ) : string
$p_moduleName string
$p_directory string
return string or false in case of error

create() public method

Create a module configuration object for a given module name and array of variables
public create ( string $p_moduleName, array $p_variables )
$p_moduleName string
$p_variables array

moduleName() public method

Return the module name
public moduleName ( ) : string
return string

read() public method

Read the configuration file corresponding to a specific module
public read ( string $p_moduleName, string $p_directory )
$p_moduleName string
$p_directory string

save() public method

Save the configuration file corresponding to module object
public save ( string $p_destDirectory = "" )
$p_destDirectory string

setValueOf() public method

Set the value of a given variable
public setValueOf ( string $p_variableName, string $p_value ) : boolean
$p_variableName string
$p_value string
return boolean

validModuleName() public method

Return the true if the module name was valid
public validModuleName ( string &$p_moduleName ) : boolean
$p_moduleName string
return boolean

valueOf() public method

Return the value of a given variable
public valueOf ( string $p_variableName ) : string
$p_variableName string
return string or false in case of error

variablesList() public method

Return the variables list as array
public variablesList ( ) : array
return array or false in case of error

Property Details

$m_directory public property

public $m_directory

$m_moduleName public property

public $m_moduleName

$m_variables public property

public $m_variables

$m_variablesList public property

public $m_variablesList