|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| accept () | |
| current () | |
| getInnerIterator () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Member Functions | |
| __clone () | |
| fetch () | |
Private Attributes | |
| $done = false | |
Iterator to search for a specific element.
This extended FilterIterator stops after finding the first acceptable value.
Definition at line 20 of file searchiterator.inc.
| SearchIterator::__call | ( | $ | func, |
| $ | params | ||
| ) |
Aggregates the inner iterator.
Reimplemented from FilterIterator.
Definition at line 52 of file searchiterator.inc.
References FilterIterator\getInnerIterator().
{
return call_user_func_array(array($this->getInnerIterator(), $func), $params);
}

| FilterIterator::__clone | ( | ) | [protected, inherited] |
hidden __clone
Reimplemented in KeyFilter.
Definition at line 104 of file filteriterator.inc.
{
// disallow clone
}
| FilterIterator::accept | ( | ) | [abstract, inherited] |
Accept function to decide whether an element of the inner iterator should be accessible through the Filteriterator.
Reimplemented in RegexIterator, CallbackFilterIterator, FindFile, KeyFilter, RegexFindFile, DirectoryFilterDots, and ParentIterator.
Referenced by FilterIterator\fetch().
| FilterIterator::current | ( | ) | [inherited] |
Implements Iterator.
Reimplemented in RegexIterator, CallbackFilterIterator, and IniGroups.
Definition at line 97 of file filteriterator.inc.
Referenced by RegexFindFile\accept(), and FindFile\accept().
{
return $this->it->current();
}
| FilterIterator::fetch | ( | ) | [protected, inherited] |
Fetch next element and store it.
Definition at line 61 of file filteriterator.inc.
References FilterIterator\accept().
Referenced by FilterIterator\next(), and FilterIterator\rewind().
{
while ($this->it->valid()) {
if ($this->accept()) {
return;
}
$this->it->next();
};
}

| FilterIterator::getInnerIterator | ( | ) | [inherited] |
Implements OuterIterator.
Definition at line 111 of file filteriterator.inc.
Referenced by __call(), DirectoryFilterDots\accept(), KeyFilter\accept(), RecursiveRegexIterator\getChildren(), RecursiveFilterIterator\getChildren(), RecursiveRegexIterator\hasChildren(), RecursiveFilterIterator\hasChildren(), and DirectoryFilterDots\key().
{
return $this->it;
}
| FilterIterator::key | ( | ) | [inherited] |
Implements Iterator.
Reimplemented in RegexIterator, CallbackFilterIterator, IniGroups, and DirectoryFilterDots.
Definition at line 90 of file filteriterator.inc.
Referenced by KeyFilter\accept().
{
return $this->it->key();
}
| SearchIterator::next | ( | ) |
Do not move forward but instead mark as finished.
Reimplemented from FilterIterator.
Definition at line 45 of file searchiterator.inc.
{
$this->done = true;
}
| SearchIterator::rewind | ( | ) |
Rewind and reset so that it once again searches.
Reimplemented from FilterIterator.
Definition at line 28 of file searchiterator.inc.
{
parent::rewind();
$this->done = false;
}
| SearchIterator::valid | ( | ) |
Reimplemented from FilterIterator.
Definition at line 37 of file searchiterator.inc.
{
return !$this->done && parent::valid();
}
SearchIterator::$done = false [private] |
whether an entry was found already
Definition at line 23 of file searchiterator.inc.
1.7.5.1