Inheritance diagram for RecursiveCachingIterator:


Public Member Functions | |
| __call ($func, $params) | |
| __construct (RecursiveIterator $it, $flags=self::CALL_TOSTRING) | |
| __toString () | |
| current () | |
| getChildren () | |
| getInnerIterator () | |
| hasChildren () | |
| hasNext () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Public Attributes | |
| const | CALL_TOSTRING = 0x00000001 |
| const | CATCH_GET_CHILD = 0x00000002 |
| const | TOSTRING_USE_CURRENT = 0x00000020 |
| const | TOSTRING_USE_KEY = 0x00000010 |
Private Attributes | |
| $getChildren | |
| $hasChildren | |
Definition at line 20 of file recursivecachingiterator.inc.
| RecursiveCachingIterator::__construct | ( | RecursiveIterator $ | it, | |
| $ | flags = self::CALL_TOSTRING | |||
| ) |
Construct from another iterator.
| it | Iterator to cache | |
| flags | Bitmask:
|
Definition at line 32 of file recursivecachingiterator.inc.
References CachingIterator::$it.
00033 { 00034 parent::__construct($it, $flags); 00035 }
| CachingIterator::__call | ( | $ | func, | |
| $ | params | |||
| ) | [inherited] |
Aggregate the inner iterator.
| func | Name of method to invoke | |
| params | Array of parameters to pass to method |
Definition at line 122 of file cachingiterator.inc.
| CachingIterator::__toString | ( | ) | [inherited] |
| exception | when CALL_TOSTRING was not specified in constructor |
Definition at line 131 of file cachingiterator.inc.
References CachingIterator::__construct(), CachingIterator::current(), and CachingIterator::key().
00132 { 00133 if ($this->flags & self::TOSTRING_USE_KEY) 00134 { 00135 return $this->key; 00136 } 00137 else if ($this->flags & self::TOSTRING_USE_CURRENT) 00138 { 00139 return $this->current; 00140 } 00141 if (!$this->flags & self::CALL_TOSTRING) 00142 { 00143 throw new exception('CachingIterator does not fetch string value (see CachingIterator::__construct)'); 00144 } 00145 return $this->strValue; 00146 }
Here is the call graph for this function:

| CachingIterator::current | ( | ) | [inherited] |
Implements Iterator.
Definition at line 105 of file cachingiterator.inc.
Referenced by CachingIterator::__toString(), and CachingIterator::next().
00106 { 00107 return $this->current; 00108 }
| RecursiveCachingIterator::getChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 93 of file recursivecachingiterator.inc.
00094 { 00095 return $this->getChildren; 00096 }
| CachingIterator::getInnerIterator | ( | ) | [inherited] |
Implements OuterIterator.
Definition at line 151 of file cachingiterator.inc.
| RecursiveCachingIterator::hasChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 86 of file recursivecachingiterator.inc.
00087 { 00088 return $this->hasChildren; 00089 }
| CachingIterator::hasNext | ( | ) | [inherited] |
| CachingIterator::key | ( | ) | [inherited] |
Implements Iterator.
Definition at line 112 of file cachingiterator.inc.
Referenced by CachingIterator::__toString(), and CachingIterator::next().
00113 { 00114 return $this->key; 00115 }
| CachingIterator::next | ( | ) | [inherited] |
Forward to the next element.
Implements Iterator.
Definition at line 69 of file cachingiterator.inc.
References CachingIterator::current(), CachingIterator::key(), and CachingIterator::valid().
Referenced by CachingIterator::__construct(), and CachingIterator::rewind().
00070 { 00071 if ($this->valid = $this->it->valid()) { 00072 $this->current = $this->it->current(); 00073 $this->key = $this->it->key(); 00074 if ($this->flags & self::CALL_TOSTRING) { 00075 if (is_object($this->current)) { 00076 $this->strValue = $this->current->__toString(); 00077 } else { 00078 $this->strValue = (string)$this->current; 00079 } 00080 } 00081 } else { 00082 $this->current = NULL; 00083 $this->key = NULL; 00084 $this->strValue = NULL; 00085 } 00086 $this->it->next(); 00087 }
Here is the call graph for this function:

| RecursiveCachingIterator::rewind | ( | ) |
| CachingIterator::valid | ( | ) | [inherited] |
Implements Iterator.
Definition at line 91 of file cachingiterator.inc.
Referenced by CachingIterator::next().
00092 { 00093 return $this->valid; 00094 }
RecursiveCachingIterator::$getChildren [private] |
Definition at line 23 of file recursivecachingiterator.inc.
RecursiveCachingIterator::$hasChildren [private] |
Definition at line 22 of file recursivecachingiterator.inc.
const CachingIterator::CALL_TOSTRING = 0x00000001 [inherited] |
Definition at line 30 of file cachingiterator.inc.
Referenced by DirectoryTreeIterator::__construct(), and DirectoryGraphIterator::__construct().
const CachingIterator::CATCH_GET_CHILD = 0x00000002 [inherited] |
Definition at line 31 of file cachingiterator.inc.
Referenced by DirectoryTreeIterator::__construct(), and DirectoryGraphIterator::__construct().
const CachingIterator::TOSTRING_USE_CURRENT = 0x00000020 [inherited] |
Definition at line 33 of file cachingiterator.inc.
const CachingIterator::TOSTRING_USE_KEY = 0x00000010 [inherited] |
Definition at line 32 of file cachingiterator.inc.
1.5.2