SPL-StandardPHPLibrary
recursivefilteriterator.inc
Go to the documentation of this file.
1 <?php
2 
30 abstract class RecursiveFilterIterator extends FilterIterator implements RecursiveIterator
31 {
35  {
36  parent::__construct($it);
37  }
38 
41  function hasChildren()
42  {
43  return $this->getInnerIterator()->hasChildren();
44  }
45 
50  function getChildren()
51  {
52  if (empty($this->ref))
53  {
54  $this->ref = new ReflectionClass($this);
55  }
56  return $this->ref->newInstance($this->getInnerIterator()->getChildren());
57  }
58 
59  private $ref;
60 }
61 
62 ?>
Iterator to filter recursive iterators.
__construct(RecursiveIterator $it)
Interface for recursive iteration with RecursiveIteratorIterator.
Abstract filter for iterators.