Class CachingIterator
Smarter caching iterator.
-
IteratorIterator
implements
Iterator,
Traversable,
OuterIterator
-
CachingIterator
implements
ArrayAccess,
Countable
-
Nette\Iterators\CachingIterator
implements
Countable
uses
Nette\SmartObject
Methods summary
public
|
|
public
boolean
|
#
isFirst( integer $width = null )
Is the current element the first one?
Is the current element the first one?
Parameters
Returns
boolean bool
|
public
boolean
|
#
isLast( integer $width = null )
Is the current element the last one?
Is the current element the last one?
Parameters
Returns
boolean bool
|
public
boolean
|
#
isEmpty( )
Is the iterator empty?
Returns
boolean bool
|
public
boolean
|
#
isOdd( )
Is the counter odd?
Returns
boolean bool
|
public
boolean
|
#
isEven( )
Is the counter even?
Returns
boolean bool
|
public
integer
|
#
getCounter( )
Returns the counter.
Returns
integer int
|
public
integer
|
#
count( )
Returns the count of elements.
Returns the count of elements.
Returns
integer int
Overrides
Implementation of
|
public
|
#
next( )
Forwards to the next element.
Forwards to the next element.
Overrides
|
public
|
#
rewind( )
Rewinds the Iterator.
Overrides
|
public
mixed
|
#
getNextKey( )
Returns the next key.
Returns
mixed mixed
|
public
mixed
|
#
getNextValue( )
Returns the next element.
Returns the next element.
Returns
mixed mixed
|
Methods inherited from CachingIterator
__toString(),
current(),
getCache(),
getFlags(),
getInnerIterator(),
hasNext(),
key(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
setFlags(),
valid()
|
Magic properties summary
public read-only
boolean
|
$first
|
public read-only
boolean
|
$last
|
public read-only
boolean
|
$empty
|
public read-only
boolean
|
$odd
|
public read-only
boolean
|
$even
|
public read-only
integer
|
$counter
|
public read-only
mixed
|
$nextKey
|
public read-only
mixed
|
$nextValue
|