class Yaf_Config_Ini extends Yaf_Config_Abstract implements Iterator, ArrayAccess, Countable (View source)

Yaf_Config_Ini enables developers to store configuration data in a familiar INI format and read them in the application by using nested object property syntax. The INI format is specialized to provide both the ability to have a hierarchy of configuration data keys and inheritance between configuration data sections. Configuration data hierarchies are supported by separating the keys with the dot or period character ("."). A section may extend or inherit from another section by following the section name with a colon character (":") and the name of the section from which data are to be inherited.


Note:

Yaf_Config_Ini utilizes the ยป parse_ini_file() PHP function. Please review this documentation to be aware of its specific behaviors, which propagate to Yaf_Config_Ini, such as how the special values of "TRUE", "FALSE", "yes", "no", and "NULL" are handled.

Properties

protected array $_config from  Yaf_Config_Abstract
protected bool $_readonly from  Yaf_Config_Abstract

Methods

mixed
get(string|null $name = null)

No description

bool
set(string $name, mixed $value)

No description

int
count()

No description

void
rewind()

No description

mixed
current()

No description

mixed
key()

No description

void
next()

No description

bool
valid()

No description

bool
readonly()

No description

array
toArray()

No description

void
offsetSet(TKey $offset, TValue $value)

No description

void
offsetUnset(mixed $name) deprecated

No description

bool
offsetExists(mixed $name)

No description

mixed
offsetGet(mixed $name)

No description

mixed
__get(string $name = null)

No description

bool
__isset(string $name)

No description

__construct(array|string $config_file, string|null $section = null)

No description

__set(mixed $name, mixed $value)

No description

Details

mixed get(string|null $name = null)

No description

Parameters

string|null $name

Return Value

mixed

See also

Yaf_Config_Abstract::get

bool set(string $name, mixed $value)

No description

Parameters

string $name
mixed $value

Return Value

bool

See also

Yaf_Config_Abstract::set

int count()

No description

Return Value

int

The custom count as an integer.

The return value is cast to an integer.

See also

Yaf_Config_Abstract::count

void rewind()

No description

Return Value

void

Any returned value is ignored.

See also

Yaf_Config_Abstract::rewind

mixed current()

No description

Return Value

mixed

Can return any type.

See also

Yaf_Config_Abstract::current

mixed key()

No description

Return Value

mixed

TKey on success, or null on failure.

See also

Yaf_Config_Abstract::key

void next()

No description

Return Value

void

Any returned value is ignored.

See also

Yaf_Config_Abstract::next

bool valid()

No description

Return Value

bool

The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

See also

Yaf_Config_Abstract::valid

bool readonly()

No description

Return Value

bool

See also

Yaf_Config_Abstract::readonly

array toArray()

No description

Return Value

array

See also

Yaf_Config_Abstract::toArray

void offsetSet(TKey $offset, TValue $value)

No description

Parameters

TKey $offset

The offset to assign the value to.

TValue $value

The value to set.

Return Value

void

See also

Yaf_Config_Abstract::offsetSet

void offsetUnset(mixed $name) deprecated

deprecated not_implemented

No description

Parameters

mixed $name

Return Value

void

See also

Yaf_Config_Abstract::offsetUnset

bool offsetExists(mixed $name)

No description

Parameters

mixed $name

Return Value

bool

true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

See also

Yaf_Config_Abstract::offsetExists

mixed offsetGet(mixed $name)

No description

Parameters

mixed $name

Return Value

mixed

Can return all value types.

See also

Yaf_Config_Abstract::offsetGet

mixed __get(string $name = null)

No description

Parameters

string $name

Return Value

mixed

See also

Yaf_Config_Abstract::__get

bool __isset(string $name)

No description

Parameters

string $name

Return Value

bool

See also

Yaf_Config_Abstract::__isset

__construct(array|string $config_file, string|null $section = null)

No description

Parameters

array|string $config_file
string|null $section

Exceptions

Yaf_Exception_TypeError

__set(mixed $name, mixed $value)

No description

Parameters

mixed $name
mixed $value

See also

Yaf_Config_Abstract::__set