CachingIterator
class CachingIterator extends CachingIterator implements Countable
Enhanced caching iterator with first/last/counter tracking.
Properties
| bool read-only | $first | ||
| bool read-only | $last | ||
| bool read-only | $empty | ||
| bool read-only | $odd | ||
| bool read-only | $even | ||
| int read-only | $counter | ||
| TKey read-only | $nextKey | ||
| TValue read-only | $nextValue |
Methods
__construct(iterable|stdClass $iterable)
No description
bool
isFirst(int|null $gridWidth = null)
Is the current element the first one?
bool
isLast(int|null $gridWidth = null)
Is the current element the last one?
bool
isEmpty()
No description
bool
isOdd()
No description
bool
isEven()
No description
int
getCounter()
No description
int
count()
No description
void
next()
Forwards to the next element.
void
rewind()
Rewinds the Iterator.
mixed
getNextKey()
No description
mixed
getNextValue()
No description
Details
at line 36
__construct(iterable|stdClass $iterable)
No description
at line 48
bool
isFirst(int|null $gridWidth = null)
Is the current element the first one?
at line 57
bool
isLast(int|null $gridWidth = null)
Is the current element the last one?
at line 63
bool
isEmpty()
No description
at line 69
bool
isOdd()
No description
at line 75
bool
isEven()
No description
at line 81
int
getCounter()
No description
at line 87
int
count()
No description
at line 102
void
next()
Forwards to the next element.
at line 114
void
rewind()
Rewinds the Iterator.
at line 122
mixed
getNextKey()
No description
at line 129
mixed
getNextValue()
No description
Traits
Strict class for better experience.