PHP Class Phrozn\Config

Author: Victor Farazdagi
Inheritance: implements ArrayAccess
Show file Open project: farazdagi/phrozn

Public Methods

Method Description
__construct ( string $path ) Setup config aggregator
offsetExists ( $offset ) : boolean Check whether specified config section exists
offsetGet ( string $offset ) : array Get loaded configuration identified by $offset
offsetSet ( string $offset, array $value ) : Config Set config file identified by $offset
offsetUnset ( string $offset ) : Config Unset config file specified by $offset
updatePaths ( ) : Config Make sure that absolute application path is prepended to config paths

Method Details

__construct() public method

Setup config aggregator
public __construct ( string $path )
$path string Path to config folder

offsetExists() public method

Check whether specified config section exists
public offsetExists ( $offset ) : boolean
return boolean

offsetGet() public method

Get loaded configuration identified by $offset
public offsetGet ( string $offset ) : array
$offset string Configuration file basename (w/o extension)
return array

offsetSet() public method

Set config file identified by $offset
public offsetSet ( string $offset, array $value ) : Config
$offset string Configuration file basename (w/o extension)
$value array
return Config

offsetUnset() public method

Unset config file specified by $offset
public offsetUnset ( string $offset ) : Config
$offset string Configuration item to unset
return Config

updatePaths() public method

Make sure that absolute application path is prepended to config paths
public updatePaths ( ) : Config
return Config