|
SPL-StandardPHPLibrary
|


Public Member Functions | |
| __call ($func, $params) | |
| __construct ($path, $file) | |
| accept () | |
| current () | |
| getInnerIterator () | |
| getSearch () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Protected Member Functions | |
| __clone () | |
| fetch () | |
Private Attributes | |
| $file | |
| FindFile::__construct | ( | $ | path, |
| $ | file | ||
| ) |
Construct from path and filename.
| $path | the directory to search in If path contains ';' then this parameter is split and every part of it is used as separate directory. |
| $file | the name of the files to search fro |
Reimplemented in RegexFindFile.
Definition at line 33 of file findfile.inc.
References $file, and FilterIterator\$it.
{
$this->file = $file;
$list = split(PATH_SEPARATOR, $path);
if (count($list) <= 1) {
parent::__construct(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
} else {
$it = new AppendIterator();
foreach($list as $path) {
$it->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)));
}
parent::__construct($it);
}
}
| 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
}
| FindFile::accept | ( | ) |
Reimplemented from FilterIterator.
Reimplemented in RegexFindFile.
Definition at line 50 of file findfile.inc.
References FilterIterator\current().
{
return !strcmp($this->current(), $this->file);
}

| FilterIterator::current | ( | ) | [inherited] |
Implements Iterator.
Reimplemented in RegexIterator, CallbackFilterIterator, and IniGroups.
Definition at line 97 of file filteriterator.inc.
Referenced by RegexFindFile\accept(), and 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 SearchIterator\__call(), DirectoryFilterDots\accept(), KeyFilter\accept(), RecursiveRegexIterator\getChildren(), RecursiveFilterIterator\getChildren(), RecursiveRegexIterator\hasChildren(), RecursiveFilterIterator\hasChildren(), and DirectoryFilterDots\key().
{
return $this->it;
}
| FindFile::getSearch | ( | ) |
Definition at line 59 of file findfile.inc.
Referenced by RegexFindFile\accept().
{
return $this->file;
}
| 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();
}
FindFile::$file [private] |
1.7.5.1