CachingIterator
class CachingIterator extends CachingIterator implements Countable
Smarter caching iterator.
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 | ||
mixed read-only | $nextKey | ||
mixed read-only | $nextValue |
Methods
__construct($iterator)
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()
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)
No description
at line 61
bool
isFirst(int|null $gridWidth = null)
Is the current element the first one?
at line 70
bool
isLast(int|null $gridWidth = null)
Is the current element the last one?
at line 79
bool
isEmpty()
Is the iterator empty?
at line 88
bool
isOdd()
Is the counter odd?
at line 97
bool
isEven()
Is the counter even?
at line 106
int
getCounter()
Returns the counter.
at line 115
int
count()
Returns the count of elements.
at line 130
void
next()
Forwards to the next element.
at line 142
void
rewind()
Rewinds the Iterator.
at line 153
mixed
getNextKey()
Returns the next key.
at line 163
mixed
getNextValue()
Returns the next element.
Traits
Strict class for better experience.