\PrivateBinConfiguration

Configuration

parses configuration file, ensures default values present

Summary

Methods
Properties
Constants
__construct()
get()
getDefaults()
getKey()
getSection()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$_configuration
$_defaults
N/A

Properties

$_configuration

$_configuration : array

parsed configuration

Type

array

$_defaults

$_defaults : array

default configuration

Type

array

Methods

__construct()

__construct() 

parse configuration file and ensure default configuration values are present

Throws

\Exception

get()

get() : array

get configuration as array

Returns

array

getDefaults()

getDefaults() : array

get default configuration as array

Returns

array

getKey()

getKey(string  $key, string  $section = 'main') : mixed

get a key from the configuration, typically the main section or all keys

Parameters

string $key
string $section

defaults to main

Throws

\Exception

Returns

mixed

getSection()

getSection(string  $section) : mixed

get a section from the configuration, must exist

Parameters

string $section

Throws

\Exception

Returns

mixed