class CachingIterator extends CachingIterator implements Countable

Smarter caching iterator.

Traits

Strict class for better experience.

Methods

__construct($iterator)

No description

bool
isFirst(int $gridWidth = null)

Is the current element the first one?

bool
isLast(int $gridWidth = null)

Is the current element the last one?

bool
isEmpty()

Is the iterator empty?

bool
isOdd()

Is the counter odd?

bool
isEven()

Is the counter even?

int
getCounter()

Returns the counter.

int
count()

Returns the count of elements.

void
next()

Forwards to the next element.

void
rewind()

Rewinds the Iterator.

mixed
getNextKey()

Returns the next key.

mixed
getNextValue()

Returns the next element.

Details

at line 35
__construct($iterator)

Parameters

$iterator

at line 60
bool isFirst(int $gridWidth = null)

Is the current element the first one?

Parameters

int $gridWidth

Return Value

bool

at line 69
bool isLast(int $gridWidth = null)

Is the current element the last one?

Parameters

int $gridWidth

Return Value

bool

at line 78
bool isEmpty()

Is the iterator empty?

Return Value

bool

at line 87
bool isOdd()

Is the counter odd?

Return Value

bool

at line 96
bool isEven()

Is the counter even?

Return Value

bool

at line 105
int getCounter()

Returns the counter.

Return Value

int

at line 114
int count()

Returns the count of elements.

Return Value

int

at line 129
void next()

Forwards to the next element.

Return Value

void

at line 141
void rewind()

Rewinds the Iterator.

Return Value

void

at line 152
mixed getNextKey()

Returns the next key.

Return Value

mixed

at line 162
mixed getNextValue()

Returns the next element.

Return Value

mixed