php-src/ext/spl/internal/parentiterator.inc

25 lines
378 B
PHP
Raw Normal View History

2003-11-22 20:52:06 +00:00
<?php
class ParentIterator extends FilterIterator implements RecursiveIterator
{
function __construct(RecursiveIterator $it)
{
parent::__construct($it);
}
2003-11-22 20:52:06 +00:00
function accept()
{
return $this->it->hasChildren();
}
function hasChildren()
{
return $this->it->hasChildren();
}
function getChildren()
{
return new ParentIterator($this->it->getChildren());
}
}
?>