PHP Class Bluz\Config\Config

Author: Anton Shevchuk
Afficher le fichier Open project: bluzphp/framework Class Usage Examples

Protected Properties

Свойство Type Description
$config configuration data
$environment environment
$modules modules configuration data
$path path to configuration files

Méthodes publiques

Méthode Description
getData ( string | null $key = null, string | null $section = null ) : array | mixed Return configuration by key
getModuleData ( string $module, string $section = null ) : mixed Return module configuration by section
init ( ) : void Load configuration
setEnvironment ( string $environment ) : void Set application environment
setPath ( string $path ) : void Set path to configuration files

Méthodes protégées

Méthode Description
loadFile ( string $path ) : array Load configuration file
loadFiles ( string $path ) : array Load configuration files to array

Method Details

getData() public méthode

Return configuration by key
public getData ( string | null $key = null, string | null $section = null ) : array | mixed
$key string | null Key of config
$section string | null Section of config
Résultat array | mixed

getModuleData() public méthode

Return module configuration by section
public getModuleData ( string $module, string $section = null ) : mixed
$module string
$section string
Résultat mixed

init() public méthode

Load configuration
public init ( ) : void
Résultat void

loadFile() protected méthode

Load configuration file
protected loadFile ( string $path ) : array
$path string
Résultat array

loadFiles() protected méthode

Load configuration files to array
protected loadFiles ( string $path ) : array
$path string
Résultat array

setEnvironment() public méthode

Set application environment
public setEnvironment ( string $environment ) : void
$environment string
Résultat void

setPath() public méthode

Set path to configuration files
public setPath ( string $path ) : void
$path string
Résultat void

Property Details

$config protected_oe property

configuration data
protected $config

$environment protected_oe property

environment
protected $environment

$modules protected_oe property

modules configuration data
protected $modules

$path protected_oe property

path to configuration files
protected $path