Interface

TRex\Iterator\IObjectsIterator

interface IObjectsIterator implements IIterator, Iterator

Interface IObjectsIterator.

Methods

bool exist(mixed $key)

Checks if the offset exists.

from IIterator
mixed get(mixed $key)

Gets the value from the provided offset.

from IIterator
mixed key()

Gets the current array key.

from IIterator
mixed current()

Gets the current array entry.

from IIterator
next()

Sets the iterator to the next entry.

from IIterator
rewind()

Rewinds the iterator to the beginning.

from IIterator
seek(int $index)

Sets the iterator to a specified offset.

from IIterator
bool valid()

Checks if the array contains any more entries.

from IIterator
addAt(mixed $key, mixed $value)

Sets a value for a specified offset.

from IIterator
removeAt(mixed $key)

Unsets a value for an offset.

from IIterator
int count()

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

from IIterator
array toArray()

{@inheritDoc}

from IIterator

Details

in IIterator at line 19
public bool exist(mixed $key)

Checks if the offset exists.

Parameters

mixed $key

Return Value

bool

in IIterator at line 27
public mixed get(mixed $key)

Gets the value from the provided offset.

Parameters

mixed $key

Return Value

mixed

in IIterator at line 34
public mixed key()

Gets the current array key.

Return Value

mixed

in IIterator at line 41
public mixed current()

Gets the current array entry.

Return Value

mixed

in IIterator at line 46
public next()

Sets the iterator to the next entry.

in IIterator at line 51
public rewind()

Rewinds the iterator to the beginning.

in IIterator at line 58
public seek(int $index)

Sets the iterator to a specified offset.

Parameters

int $index

in IIterator at line 65
public bool valid()

Checks if the array contains any more entries.

Return Value

bool

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

Sets a value for a specified offset.

Parameters

mixed $key
mixed $value

in IIterator at line 80
public removeAt(mixed $key)

Unsets a value for an offset.

Parameters

mixed $key

in IIterator 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

in IIterator at line 94
public array toArray()

{@inheritDoc}

Return Value

array