Class SmartCachingIterator (namespace Nette)
Smarter caching interator.
CachingIterator | --SmartCachingIterator
Public Method Summary | |
---|---|
SmartCachingIterator |
__construct
($iterator)
|
int |
getCounter
()
Returns the counter.
|
int |
getIndex
()
Returns the current index (counter - 1).
|
bool |
isEmpty
()
Is the iterator empty?
|
bool |
isEven
()
Is the counter even?
|
bool |
isFirst
()
Is the current element the first one?
|
bool |
isLast
()
Is the current element the last one?
|
bool |
isOdd
()
Is the counter odd?
|
void |
next
()
Forwards to the next element.
|
void |
rewind
()
Rewinds the Iterator.
|
mixed |
__call
(string $name, array $args)
Call to undefined method.
|
& mixed |
__get
(string $name)
Returns property value. Do not call directly.
|
bool |
__isset
(string $name)
Is property defined?
|
void |
__set
(string $name, mixed $value)
Sets value of a property. Do not call directly.
|
void |
__unset
(string $name)
Access to undeclared property.
|
Methods Inherited From CachingIterator (Internal Class) |
---|
constructor __construct ( $iterator, [$flags = ] ), count ( ), current ( ), getCache ( ), getFlags ( ), getInnerIterator ( ), hasNext ( ), key ( ), next ( ), offsetExists ( $index ), offsetGet ( $index ), offsetSet ( $index, $newval ), offsetUnset ( $index ), rewind ( ), setFlags ( $flags ), valid ( ), __toString ( ) |
Constant Summary |
---|
Constants Inherited From CachingIterator (Internal Class) |
---|
CALL_TOSTRING = 1, CATCH_GET_CHILD = 16, FULL_CACHE = 256, TOSTRING_USE_CURRENT = 4, TOSTRING_USE_INNER = 8, TOSTRING_USE_KEY = 2 |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 37 __constructpublic SmartCachingIterator __construct ($iterator)
|
|||||||||||||||||||||
line 114 getCounterpublic int getCounter () Returns the counter.
|
|||||||||||||||||||||
line 126 getIndexpublic int getIndex () Returns the current index (counter - 1).
|
|||||||||||||||||||||
line 81 isEmptypublic bool isEmpty () Is the iterator empty?
|
|||||||||||||||||||||
line 103 isEvenpublic bool isEven () Is the counter even?
|
|||||||||||||||||||||
line 59 isFirstpublic bool isFirst () Is the current element the first one?
|
|||||||||||||||||||||
line 70 isLastpublic bool isLast () Is the current element the last one?
|
|||||||||||||||||||||
line 92 isOddpublic bool isOdd () Is the counter odd?
|
|||||||||||||||||||||
line 137 nextpublic void next () Forwards to the next element.
|
|||||||||||||||||||||
line 151 rewindpublic void rewind () Rewinds the Iterator.
|
|||||||||||||||||||||
line 171 __callpublic mixed __call (string $name, array $args) Call to undefined method.
|
|||||||||||||||||||||
line 185 __getpublic mixed & __get (string $name) Returns property value. Do not call directly.
|
|||||||||||||||||||||
line 213 __issetpublic bool __isset (string $name) Is property defined?
|
|||||||||||||||||||||
line 200 __setpublic void __set (string $name, mixed $value) Sets value of a property. Do not call directly.
|
|||||||||||||||||||||
line 227 __unsetpublic void __unset (string $name) Access to undeclared property.
|