mirror of
https://github.com/php/php-src.git
synced 2024-10-19 07:22:40 +00:00
159c538bcf
- Remove all overloading hooks -> array_read/array_access must be rewritten - Remove all basic iterators - Remove all 'spl_' prefixing exposed to user level - Add RecursiveIterator, RecursiveIteratorIterator - Add DirectoryIterator, DirectoryTreeIterator - Add some examples
26 lines
449 B
PHP
Executable File
26 lines
449 B
PHP
Executable File
<?php
|
|
|
|
class DirectoryFilterDots extends FilterIterator implements RecursiveIterator
|
|
{
|
|
function __construct($path) {
|
|
parent::__construct(new DirectoryIterator($path));
|
|
}
|
|
|
|
function accept() {
|
|
return !$this->it->isDot();
|
|
}
|
|
|
|
function hasChildren() {
|
|
return $this->it->hasChildren();
|
|
}
|
|
|
|
function getChildren() {
|
|
return new DirectoryFilterDots($this->it->getPathname());
|
|
}
|
|
|
|
function key() {
|
|
return $this->it->getPathname();
|
|
}
|
|
}
|
|
|
|
?>
|