\Pop\ConfigConfig

Config class

Summary

Methods
Properties
Constants
__construct()
merge()
toArray()
changesAllowed()
__get()
__set()
__isset()
__unset()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
No public properties found
No constants found
setConfig()
getConfig()
parseConfig()
$allowChanges
$data
$array
N/A
No private methods found
No private properties found
N/A

Properties

$allowChanges

$allowChanges : boolean

Flag for whether or not changes are allowed after object instantiation

Type

boolean

$data

$data : array

Config values as config objects

Type

array

$array

$array : array

Config values as an array

Type

array

Methods

__construct()

__construct(mixed  $data, boolean  $changes = false) : \Pop\Config\Config

Constructor

Instantiate a config object

Parameters

mixed $data
boolean $changes

Returns

\Pop\Config\Config

merge()

merge(mixed  $data) : \Pop\Config\Config

Merge the values of another config object into this one

Parameters

mixed $data

Throws

\Pop\Config\Exception

Returns

\Pop\Config\Config

toArray()

toArray(boolean  $arrayObject = false) : array

Get the config values as an array or ArrayObject

Parameters

boolean $arrayObject

Returns

array

changesAllowed()

changesAllowed() : boolean

Return if changes to the config are allowed.

Returns

boolean

__get()

__get(string  $name) : mixed

Magic get method to return the value of config[$name].

Parameters

string $name

Returns

mixed

__set()

__set(string  $name, mixed  $value) : void

Magic set method to set the property to the value of config[$name].

Parameters

string $name
mixed $value

Throws

\Pop\Config\Exception

__isset()

__isset(string  $name) : boolean

Return the isset value of config[$name].

Parameters

string $name

Returns

boolean

__unset()

__unset(string  $name) : void

Unset config[$name].

Parameters

string $name

Throws

\Pop\Config\Exception

offsetExists()

offsetExists(mixed  $offset) : boolean

ArrayAccess offsetExists

Parameters

mixed $offset

Returns

boolean

offsetGet()

offsetGet(mixed  $offset) : mixed

ArrayAccess offsetGet

Parameters

mixed $offset

Returns

mixed

offsetSet()

offsetSet(mixed  $offset, mixed  $value) : void

ArrayAccess offsetSet

Parameters

mixed $offset
mixed $value

offsetUnset()

offsetUnset(mixed  $offset) : void

ArrayAccess offsetUnset

Parameters

mixed $offset

setConfig()

setConfig(mixed  $data) : void

Set the config values

Parameters

mixed $data

Throws

\Pop\Config\Exception

getConfig()

getConfig(boolean  $arrayObject = false) : void

Get the config values as array

Parameters

boolean $arrayObject

parseConfig()

parseConfig(mixed  $data) : array

Parse passed the config values

Parameters

mixed $data

Returns

array