Properties

$allowChanges

$allowChanges : boolean

Flag for whether or not changes are allowed after object instantiation

Type

boolean

$configValue

$configValue : array

Config value(s)

Type

array

Methods

__construct()

__construct(mixed  $configValue, boolean  $changes = false, string  $name = null) 

Constructor

Instantiate a config object

Parameters

mixed $configValue
boolean $changes
string $name

count()

count() : integer

Method to get the count of data in the config

Returns

integer

getIterator()

getIterator() : \ArrayIterator

Method to iterate over the config

Returns

\ArrayIterator

merge()

merge(mixed  $configValue, boolean  $preserve = false) : \Pop\Config\Config

Merge the values of another config object into this one.

By default, existing values are overwritten, unless the $preserve flag is set to true.

Parameters

mixed $configValue
boolean $preserve

Throws

\Pop\Config\Exception

Returns

\Pop\Config\Config

toArray()

toArray() : array

Get the config value()s as an array

Returns

array

toScalar()

toScalar() : mixed

Attempt to render config as a scalar value

Returns

mixed

isScalar()

isScalar() : boolean

Determine if the value of the config object is scalar

Returns

boolean

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

__toString()

__toString() : string

Attempt to render config as a string

Returns

string

setConfigValue()

setConfigValue(mixed  $configValue, string  $name = null) : void

Set the config values

Parameters

mixed $configValue
string $name

Throws

\Pop\Config\Exception

parseConfigValue()

parseConfigValue(mixed  $configValue) : array

Parse passed the config values

Parameters

mixed $configValue

Returns

array