Interface

TRex\Iterator\IIterator

interface IIterator

Interface IIterator.

Methods

bool exist(mixed $key)

Checks if the offset exists.

mixed get(mixed $key)

Gets the value from the provided offset.

mixed key()

Gets the current array key.

mixed current()

Gets the current array entry.

next()

Sets the iterator to the next entry.

rewind()

Rewinds the iterator to the beginning.

seek(int $index)

Sets the iterator to a specified offset.

bool valid()

Checks if the array contains any more entries.

addAt(mixed $key, mixed $value)

Sets a value for a specified offset.

removeAt(mixed $key)

Unsets a value for an offset.

int count()

Gets the number of elements in the array, or the number of public properties in the object.

array toArray()

{@inheritDoc}

Details

at line 19
public bool exist(mixed $key)

Checks if the offset exists.

Parameters

mixed $key

Return Value

bool

at line 27
public mixed get(mixed $key)

Gets the value from the provided offset.

Parameters

mixed $key

Return Value

mixed

at line 34
public mixed key()

Gets the current array key.

Return Value

mixed

at line 41
public mixed current()

Gets the current array entry.

Return Value

mixed

at line 46
public next()

Sets the iterator to the next entry.

at line 51
public rewind()

Rewinds the iterator to the beginning.

at line 58
public seek(int $index)

Sets the iterator to a specified offset.

Parameters

int $index

at line 65
public bool valid()

Checks if the array contains any more entries.

Return Value

bool

at line 73
public addAt(mixed $key, mixed $value)

Sets a value for a specified offset.

Parameters

mixed $key
mixed $value

at line 80
public removeAt(mixed $key)

Unsets a value for an offset.

Parameters

mixed $key

at line 87
public int count()

Gets the number of elements in the array, or the number of public properties in the object.

Return Value

int

at line 94
public array toArray()

{@inheritDoc}

Return Value

array