public function File_Iterator::__construct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/php-file-iterator/src/Iterator.php \File_Iterator::__construct()
Parameters
Iterator $iterator:
array $suffixes:
array $prefixes:
array $exclude:
string $basepath:
File
- vendor/
phpunit/ php-file-iterator/ src/ Iterator.php, line 49
Class
- File_Iterator
- FilterIterator implementation that filters files based on prefix(es) and/or suffix(es). Hidden files and files from hidden directories are also filtered.
Code
public function __construct(Iterator $iterator, array $suffixes = array(), array $prefixes = array(), array $exclude = array(), $basepath = NULL) {
$exclude = array_filter(array_map('realpath', $exclude));
if ($basepath !== NULL) {
$basepath = realpath($basepath);
}
if ($basepath === FALSE) {
$basepath = NULL;
}
else {
foreach ($exclude as &$_exclude) {
$_exclude = str_replace($basepath, '', $_exclude);
}
}
$this->prefixes = $prefixes;
$this->suffixes = $suffixes;
$this->exclude = $exclude;
$this->basepath = $basepath;
parent::__construct($iterator);
}