Inheritance diagram for RecursiveDualIterator:


Public Member Functions | |
| __construct (RecursiveIterator $lhs, RecursiveIterator $rhs, $flags=0x33) | |
| areEqual () | |
| areIdentical () | |
| current () | |
| getChildren () | |
| getFlags () | |
| getLHS () | |
| getRHS () | |
| hasChildren () | |
| key () | |
| next () | |
| rewind () | |
| setFlags ($flags) | |
| valid () | |
Static Public Member Functions | |
| static | compareIterators (Iterator $lhs, Iterator $rhs, $identical=false) |
Public Attributes | |
| const | CURRENT_0 = 0x00 |
| const | CURRENT_ARRAY = 0x03 |
| const | CURRENT_LHS = 0x01 |
| const | CURRENT_RHS = 0x02 |
| const | DEFAULT_FLAGS = 0x33 |
| const | KEY_0 = 0x00 |
| const | KEY_ARRAY = 0x30 |
| const | KEY_LHS = 0x10 |
| const | KEY_RHS = 0x20 |
Private Attributes | |
| $ref | |
Definition at line 17 of file recursivedualiterator.inc.
| RecursiveDualIterator::__construct | ( | RecursiveIterator $ | lhs, | |
| RecursiveIterator $ | rhs, | |||
| $ | flags = 0x33 | |||
| ) |
construct iterator from two RecursiveIterator instances
Definition at line 27 of file recursivedualiterator.inc.
References DualIterator::$flags, DualIterator::$lhs, and DualIterator::$rhs.
| RecursiveDualIterator::areEqual | ( | ) |
Reimplemented from DualIterator.
Definition at line 65 of file recursivedualiterator.inc.
References DualIterator::getLHS(), and DualIterator::getRHS().
00066 { 00067 return $this->getLHS()->hasChildren() === $this->getRHS()->hasChildren() 00068 && parent::areEqual(); 00069 }
Here is the call graph for this function:

| RecursiveDualIterator::areIdentical | ( | ) |
Reimplemented from DualIterator.
Definition at line 56 of file recursivedualiterator.inc.
References DualIterator::getLHS(), and DualIterator::getRHS().
00057 { 00058 return $this->getLHS()->hasChildren() === $this->getRHS()->hasChildren() 00059 && parent::areIdentical(); 00060 }
Here is the call graph for this function:

| static DualIterator::compareIterators | ( | Iterator $ | lhs, | |
| Iterator $ | rhs, | |||
| $ | identical = false | |||
| ) | [static, inherited] |
Compare two iterators.
| lhs | Left Hand Side Iterator | |
| rhs | Right Hand Side Iterator | |
| identical | whether to use areEqual() or areIdentical() |
Definition at line 168 of file dualiterator.inc.
References $it, DualIterator::$lhs, DualIterator::$rhs, DualIterator::areEqual(), and DualIterator::areIdentical().
00170 { 00171 if ($lhs instanceof RecursiveIterator) 00172 { 00173 if ($rhs instanceof RecursiveIterator) 00174 { 00175 $it = new RecursiveDualIterator($lhs, $rhs, 00176 self::CURRENT_0 | self::KEY_0); 00177 $it = new RecursiveCompareDualIterator($it); 00178 } 00179 else 00180 { 00181 return false; 00182 } 00183 } 00184 else 00185 { 00186 $it = new DualIterator($lhs, $rhs, self::CURRENT_0 | self::KEY_0); 00187 } 00188 00189 if ($identical) 00190 { 00191 foreach($it as $n) 00192 { 00193 if (!$it->areIdentical()) 00194 { 00195 return false; 00196 } 00197 } 00198 } 00199 else 00200 { 00201 foreach($it as $n) 00202 { 00203 if (!$it->areEqual()) 00204 { 00205 return false; 00206 } 00207 } 00208 } 00209 return $identical ? $it->areIdentical() : $it->areEqual(); 00210 }
Here is the call graph for this function:

| DualIterator::current | ( | ) | [inherited] |
Implements Iterator.
Definition at line 94 of file dualiterator.inc.
00095 { 00096 switch($this->flags & 0x0F) 00097 { 00098 default: 00099 case self::CURRENT_ARRAY: 00100 return array($this->lhs->current(), $this->rhs->current()); 00101 case self::CURRENT_LHS: 00102 return $this->lhs->current(); 00103 case self::CURRENT_RHS: 00104 return $this->rhs->current(); 00105 case self::CURRENT_0: 00106 return NULL; 00107 } 00108 }
| RecursiveDualIterator::getChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 43 of file recursivedualiterator.inc.
References DualIterator::getFlags(), DualIterator::getLHS(), and DualIterator::getRHS().
00044 { 00045 if (empty($this->ref)) 00046 { 00047 $this->ref = new ReflectionClass($this); 00048 } 00049 return $this->ref->newInstance( 00050 $this->getLHS()->getChildren(), $this->getRHS()->getChildren(), $this->getFlags()); 00051 }
Here is the call graph for this function:

| DualIterator::getFlags | ( | ) | [inherited] |
| DualIterator::getLHS | ( | ) | [inherited] |
Definition at line 51 of file dualiterator.inc.
Referenced by areEqual(), areIdentical(), getChildren(), and hasChildren().
| DualIterator::getRHS | ( | ) | [inherited] |
Definition at line 58 of file dualiterator.inc.
Referenced by areEqual(), areIdentical(), getChildren(), and hasChildren().
| RecursiveDualIterator::hasChildren | ( | ) |
Implements RecursiveIterator.
Definition at line 35 of file recursivedualiterator.inc.
References DualIterator::getLHS(), and DualIterator::getRHS().
Here is the call graph for this function:

| DualIterator::key | ( | ) | [inherited] |
Implements Iterator.
Definition at line 112 of file dualiterator.inc.
00113 { 00114 switch($this->flags & 0xF0) 00115 { 00116 default: 00117 case self::CURRENT_ARRAY: 00118 return array($this->lhs->key(), $this->rhs->key()); 00119 case self::CURRENT_LHS: 00120 return $this->lhs->key(); 00121 case self::CURRENT_RHS: 00122 return $this->rhs->key(); 00123 case self::CURRENT_0: 00124 return NULL; 00125 } 00126 }
| DualIterator::next | ( | ) | [inherited] |
move both inner iterators forward
Implements Iterator.
Definition at line 130 of file dualiterator.inc.
| DualIterator::rewind | ( | ) | [inherited] |
| DualIterator::setFlags | ( | $ | flags | ) | [inherited] |
| flags | new flags |
Definition at line 65 of file dualiterator.inc.
References DualIterator::$flags.
00066 { 00067 $this->flags = $flags; 00068 }
| DualIterator::valid | ( | ) | [inherited] |
Implements Iterator.
Definition at line 87 of file dualiterator.inc.
Referenced by DualIterator::areEqual(), and DualIterator::areIdentical().
RecursiveDualIterator::$ref [private] |
Definition at line 19 of file recursivedualiterator.inc.
const DualIterator::CURRENT_0 = 0x00 [inherited] |
Definition at line 22 of file dualiterator.inc.
const DualIterator::CURRENT_ARRAY = 0x03 [inherited] |
Definition at line 21 of file dualiterator.inc.
const DualIterator::CURRENT_LHS = 0x01 [inherited] |
Definition at line 19 of file dualiterator.inc.
const DualIterator::CURRENT_RHS = 0x02 [inherited] |
Definition at line 20 of file dualiterator.inc.
const DualIterator::DEFAULT_FLAGS = 0x33 [inherited] |
Definition at line 29 of file dualiterator.inc.
const DualIterator::KEY_0 = 0x00 [inherited] |
Definition at line 27 of file dualiterator.inc.
const DualIterator::KEY_ARRAY = 0x30 [inherited] |
Definition at line 26 of file dualiterator.inc.
const DualIterator::KEY_LHS = 0x10 [inherited] |
Definition at line 24 of file dualiterator.inc.
const DualIterator::KEY_RHS = 0x20 [inherited] |
Definition at line 25 of file dualiterator.inc.
1.5.2