Class SmartCachingIterator (namespace Nette)
Smarter caching interator.
CachingIterator | --SmartCachingIterator
Implements interfaces:
Public Method Summary | |
---|---|
SmartCachingIterator |
__construct
($iterator)
|
int |
count
()
Returns the count of elements.
|
int |
getCounter
()
Returns the counter.
|
mixed |
getNextKey
()
Returns the next key.
|
mixed |
getNextValue
()
Returns the next element.
|
bool |
isEmpty
()
Is the iterator empty?
|
bool |
isEven
()
Is the counter even?
|
bool |
isFirst
([int $width =
NULL ])
Is the current element the first one?
|
bool |
isLast
([int $width =
NULL ])
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 34 __constructpublic SmartCachingIterator __construct ($iterator)
|
|||||||||||||||||||||
line 124 countpublic int count () Returns the count of elements. Implementation of:
Countable::count
|
|||||||||||||||||||||
line 113 getCounterpublic int getCounter () Returns the counter.
|
|||||||||||||||||||||
line 167 getNextKeypublic mixed getNextKey () Returns the next key.
|
|||||||||||||||||||||
line 178 getNextValuepublic mixed getNextValue () Returns the next element.
|
|||||||||||||||||||||
line 80 isEmptypublic bool isEmpty () Is the iterator empty?
|
|||||||||||||||||||||
line 102 isEvenpublic bool isEven () Is the counter even?
|
|||||||||||||||||||||
line 57 isFirstpublic bool isFirst ([int $width = Is the current element the first one?
|
|||||||||||||||||||||
line 69 isLastpublic bool isLast ([int $width = Is the current element the last one?
|
|||||||||||||||||||||
line 91 isOddpublic bool isOdd () Is the counter odd?
|
|||||||||||||||||||||
line 141 nextpublic void next () Forwards to the next element.
|
|||||||||||||||||||||
line 155 rewindpublic void rewind () Rewinds the Iterator.
|
|||||||||||||||||||||
line 197 __callpublic mixed __call (string $name, array $args) Call to undefined method.
|
|||||||||||||||||||||
line 211 __getpublic mixed & __get (string $name) Returns property value. Do not call directly.
|
|||||||||||||||||||||
line 239 __issetpublic bool __isset (string $name) Is property defined?
|
|||||||||||||||||||||
line 226 __setpublic void __set (string $name, mixed $value) Sets value of a property. Do not call directly.
|
|||||||||||||||||||||
line 253 __unsetpublic void __unset (string $name) Access to undeclared property.
|