SPL-StandardPHPLibrary
recursiveregexiterator.inc
Go to the documentation of this file.
00001 <?php
00002 
00020 class RecursiveRegexIterator extends RegexIterator implements RecursiveIterator
00021 {
00034     function __construct(RecursiveIterator $it, $regex, $mode = 0, $flags = 0, $preg_flags = 0) {
00035         parent::__construct($it, $regex, $mode, $flags, $preg_flags);
00036     }
00037 
00040     function hasChildren()
00041     {
00042         return $this->getInnerIterator()->hasChildren();
00043     }
00044 
00049     function getChildren()
00050     {
00051         if (empty($this->ref))
00052         {
00053             $this->ref = new ReflectionClass($this);
00054         }
00055         return $this->ref->newInstance($this->getInnerIterator()->getChildren());
00056     }
00057     
00058     private $ref;
00059 }
00060 
00061 ?>