class Chainset implements Iterator

Chainset object is funny method to configure things.

Chainset has one parent and many children. We can crate and access children just like they were properties of parent. We can set properties of children using function-call syntax.

Example:

// create chainset with parent 'columns', child 'name' with
// properties value = 'Ondrej' and bg = '#555', and
// child 'modified' with property timestamp = 'now'
$columns = new Chainset;
$columns->name->value('Ondrej')->bg('#555');
$columns->modified->timestamp('now');

Properties

protected $childClass
private $position
private $first
private $last
private $children

Public Methods

__construct($childClass = null)

No description

__isset($key)

No description

final
void
cutChild(string $key)

Remove child from linked list.

__unset($key)

No description

__get($key)

No description

final
void
setFirst(string|null $key)

No description

final
string|null
getFirst()

No description

final
void
setLast(string|null $key)

No description

final
string|null
getLast()

No description

final
current()

No description

final
key()

No description

final
void
next()

No description

final
void
rewind()

No description

final
bool
valid()

No description

Protected Methods

Private Methods

Details

at line 30
__construct($childClass = null)

Parameters

$childClass

at line 36
__isset($key)

Parameters

$key

at line 43
final void cutChild(string $key)

Remove child from linked list.

Parameters

string $key

Return Value

void

at line 60
__unset($key)

Parameters

$key

at line 67
__get($key)

Parameters

$key

at line 85
final void setFirst(string|null $key)

Parameters

string|null $key

Return Value

void

at line 89
final string|null getFirst()

Return Value

string|null

at line 93
final void setLast(string|null $key)

Parameters

string|null $key

Return Value

void

at line 97
final string|null getLast()

Return Value

string|null

at line 101
final current()

at line 105
final key()

at line 109
final void next()

Return Value

void

at line 115
final void rewind()

Return Value

void

at line 119
final bool valid()

Return Value

bool