recursivecomparedualiterator.inc

Go to the documentation of this file.
00001 <?php
00002 
00017 class RecursiveCompareDualIterator extends RecursiveIteratorIterator
00018 {
00022     protected $equal = false;
00023 
00030     function __construct(RecursiveDualIterator $it, $mode = self::LEAVES_ONLY, $flags = 0)
00031     {
00032         parent::__construct($it);
00033     }
00034 
00037     function rewind()
00038     {
00039         $this->equal = true;
00040         parent::rewind();
00041     }
00042 
00046     function endChildren()
00047     {
00048         $this->equal &= !$this->getInnerIterator()->getLHS()->valid()
00049                      && !$this->getInnerIterator()->getRHS()->valid();
00050     }
00051 
00055     function areIdentical()
00056     {
00057         return $this->equal && $this->getInnerIterator()->areIdentical();
00058     }
00059 
00063     function areEqual()
00064     {
00065         return $this->equal && $this->getInnerIterator()->areEqual();
00066     }
00067 }
00068 
00069 ?>

Generated on Thu Apr 26 01:04:47 2007 for SPL-StandardPHPLibrary by  doxygen 1.5.2