PHP Class PrivateBin\Configuration

parses configuration file, ensures default values present
Show file Open project: privatebin/privatebin Class Usage Examples

Public Methods

Method Description
__construct ( ) parse configuration file and ensure default configuration values are present
get ( ) get configuration as array
getDefaults ( ) get default configuration as array
getKey ( string $key, string $section = 'main' ) get a key from the configuration, typically the main section or all keys
getSection ( string $section ) get a section from the configuration, must exist

Method Details

__construct() public method

parse configuration file and ensure default configuration values are present
public __construct ( )

get() public method

return array
public get ( )

getDefaults() public static method

return array
public static getDefaults ( )

getKey() public method

get a key from the configuration, typically the main section or all keys
public getKey ( string $key, string $section = 'main' )
$key string
$section string defaults to main

getSection() public method

get a section from the configuration, must exist
public getSection ( string $section )
$section string