|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| accept () | |
| current () | |
| getChildren () | |
| getInnerIterator () | |
| hasChildren () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Member Functions | |
| __clone () | |
| fetch () | |
Iterator to filter parents.
This extended FilterIterator allows a recursive iteration using RecursiveIteratorIterator that only shows those elements which have children.
Definition at line 22 of file parentiterator.inc.
| FilterIterator::__call | ( | $ | func, |
| $ | params | ||
| ) | [inherited] |
Aggregate the inner iterator.
| func | Name of method to invoke |
| params | Array of parameters to pass to method |
Reimplemented in SearchIterator.
Definition at line 121 of file filteriterator.inc.
{
return call_user_func_array(array($this->it, $func), $params);
}
| FilterIterator::__clone | ( | ) | [protected, inherited] |
hidden __clone
Reimplemented in KeyFilter.
Definition at line 104 of file filteriterator.inc.
{
// disallow clone
}
| ParentIterator::accept | ( | ) |
Reimplemented from FilterIterator.
Definition at line 26 of file parentiterator.inc.
{
return $this->it->hasChildren();
}
| 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();
};
}

| RecursiveFilterIterator::getChildren | ( | ) | [inherited] |
Implements RecursiveIterator.
Definition at line 50 of file recursivefilteriterator.inc.
References FilterIterator\getInnerIterator().
{
if (empty($this->ref))
{
$this->ref = new ReflectionClass($this);
}
return $this->ref->newInstance($this->getInnerIterator()->getChildren());
}

| FilterIterator::getInnerIterator | ( | ) | [inherited] |
Implements OuterIterator.
Definition at line 111 of file filteriterator.inc.
Referenced by SearchIterator\__call(), DirectoryFilterDots\accept(), KeyFilter\accept(), RecursiveRegexIterator\getChildren(), RecursiveFilterIterator\getChildren(), RecursiveRegexIterator\hasChildren(), RecursiveFilterIterator\hasChildren(), and DirectoryFilterDots\key().
{
return $this->it;
}
| RecursiveFilterIterator::hasChildren | ( | ) | [inherited] |
Implements RecursiveIterator.
Definition at line 41 of file recursivefilteriterator.inc.
References FilterIterator\getInnerIterator().
{
return $this->getInnerIterator()->hasChildren();
}

| 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();
}
| FilterIterator::next | ( | ) | [inherited] |
Move to next element.
Implements Iterator.
Reimplemented in SearchIterator.
Definition at line 75 of file filteriterator.inc.
References FilterIterator\fetch().
{
$this->it->next();
$this->fetch();
}

| FilterIterator::rewind | ( | ) | [inherited] |
Rewind the inner iterator.
Implements Iterator.
Reimplemented in SearchIterator.
Definition at line 42 of file filteriterator.inc.
References FilterIterator\fetch().
{
$this->it->rewind();
$this->fetch();
}

| FilterIterator::valid | ( | ) | [inherited] |
Implements Iterator.
Reimplemented in SearchIterator.
Definition at line 83 of file filteriterator.inc.
{
return $this->it->valid();
}
1.7.5.1