|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| __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 |
Compatibility to PHP 5.0.
Class RecursiveCachingIterator was named CachingRecursiveIterator until PHP 5.0.6.
Definition at line 24 of file cachingrecursiveiterator.inc.
| 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.
{
return call_user_func_array(array($this->it, $func), $params);
}
| CachingIterator::__toString | ( | ) | [inherited] |
| exception | when CALL_TOSTRING was not specified in constructor |
Definition at line 131 of file cachingiterator.inc.
References CachingIterator\current(), and CachingIterator\key().
{
if ($this->flags & self::TOSTRING_USE_KEY)
{
return $this->key;
}
else if ($this->flags & self::TOSTRING_USE_CURRENT)
{
return $this->current;
}
if (!$this->flags & self::CALL_TOSTRING)
{
throw new exception('CachingIterator does not fetch string value (see CachingIterator::__construct)');
}
return $this->strValue;
}

| CachingIterator::current | ( | ) | [inherited] |
Implements Iterator.
Definition at line 105 of file cachingiterator.inc.
Referenced by CachingIterator\__toString(), and CachingIterator\next().
{
return $this->current;
}
| RecursiveCachingIterator::getChildren | ( | ) | [inherited] |
Implements RecursiveIterator.
Definition at line 93 of file recursivecachingiterator.inc.
{
return $this->getChildren;
}
| CachingIterator::getInnerIterator | ( | ) | [inherited] |
Implements OuterIterator.
Definition at line 151 of file cachingiterator.inc.
{
return $this->it;
}
| RecursiveCachingIterator::hasChildren | ( | ) | [inherited] |
Implements RecursiveIterator.
Definition at line 86 of file recursivecachingiterator.inc.
{
return $this->hasChildren;
}
| CachingIterator::hasNext | ( | ) | [inherited] |
Definition at line 98 of file cachingiterator.inc.
{
return $this->it->valid();
}
| CachingIterator::key | ( | ) | [inherited] |
Implements Iterator.
Definition at line 112 of file cachingiterator.inc.
Referenced by CachingIterator\__toString(), and CachingIterator\next().
{
return $this->key;
}
| 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().
{
if ($this->valid = $this->it->valid()) {
$this->current = $this->it->current();
$this->key = $this->it->key();
if ($this->flags & self::CALL_TOSTRING) {
if (is_object($this->current)) {
$this->strValue = $this->current->__toString();
} else {
$this->strValue = (string)$this->current;
}
}
} else {
$this->current = NULL;
$this->key = NULL;
$this->strValue = NULL;
}
$this->it->next();
}

| RecursiveCachingIterator::rewind | ( | ) | [inherited] |
Rewind Iterator.
Reimplemented from CachingIterator.
| CachingIterator::valid | ( | ) | [inherited] |
Implements Iterator.
Definition at line 91 of file cachingiterator.inc.
Referenced by CachingIterator\next().
{
return $this->valid;
}
const CachingIterator::CALL_TOSTRING = 0x00000001 [inherited] |
Definition at line 30 of file cachingiterator.inc.
Referenced by DirectoryGraphIterator\__construct(), and DirectoryTreeIterator\__construct().
const CachingIterator::CATCH_GET_CHILD = 0x00000002 [inherited] |
Definition at line 31 of file cachingiterator.inc.
Referenced by DirectoryGraphIterator\__construct(), and DirectoryTreeIterator\__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.7.5.1