Inheritance diagram for AppendIterator:


Public Member Functions | |
| __call ($func, $params) | |
| __construct () | |
| append (Iterator $it) | |
| current () | |
| getInnerIterator () | |
| key () | |
| next () | |
| rewind () | |
| valid () | |
Private Attributes | |
| $iterators | |
Definition at line 18 of file appenditerator.inc.
| AppendIterator::__construct | ( | ) |
Construct an empty AppendIterator.
Definition at line 25 of file appenditerator.inc.
00026 { 00027 $this->iterators = new ArrayIterator(); 00028 }
| AppendIterator::__call | ( | $ | func, | |
| $ | params | |||
| ) |
Aggregates the inner iterator.
Definition at line 116 of file appenditerator.inc.
References getInnerIterator().
00117 { 00118 return call_user_func_array(array($this->getInnerIterator(), $func), $params); 00119 }
Here is the call graph for this function:

| AppendIterator::append | ( | Iterator $ | it | ) |
Append an Iterator.
| $it | Iterator to append |
Definition at line 38 of file appenditerator.inc.
References $it.
00039 { 00040 $this->iterators->append($it); 00041 }
| AppendIterator::current | ( | ) |
NULL
Implements Iterator.
Definition at line 71 of file appenditerator.inc.
References getInnerIterator().
00072 { 00073 /* Using $this->valid() would be exactly the same; it would omit 00074 * the access to a non valid element in the inner iterator. Since 00075 * the user didn't respect the valid() return value false this 00076 * must be intended hence we go on. */ 00077 return $this->iterators->valid() ? $this->getInnerIterator()->current() : NULL; 00078 }
Here is the call graph for this function:

| AppendIterator::getInnerIterator | ( | ) |
Implements OuterIterator.
Definition at line 45 of file appenditerator.inc.
Referenced by __call(), current(), key(), next(), rewind(), and valid().
| AppendIterator::key | ( | ) |
NULL
Implements Iterator.
Definition at line 82 of file appenditerator.inc.
References getInnerIterator().
00083 { 00084 return $this->iterators->valid() ? $this->getInnerIterator()->key() : NULL; 00085 }
Here is the call graph for this function:

| AppendIterator::next | ( | ) |
Move to the next element.
If this means to another Iterator that rewind that Iterator.
Implements Iterator.
Definition at line 91 of file appenditerator.inc.
References getInnerIterator(), and valid().
00092 { 00093 if (!$this->iterators->valid()) 00094 { 00095 return; /* done all */ 00096 } 00097 $this->getInnerIterator()->next(); 00098 if ($this->getInnerIterator()->valid()) 00099 { 00100 return; /* found valid element in current inner iterator */ 00101 } 00102 $this->iterators->next(); 00103 while ($this->iterators->valid()) 00104 { 00105 $this->getInnerIterator()->rewind(); 00106 if ($this->getInnerIterator()->valid()) 00107 { 00108 return; /* found element as first elemet in another iterator */ 00109 } 00110 $this->iterators->next(); 00111 } 00112 }
Here is the call graph for this function:

| AppendIterator::rewind | ( | ) |
Rewind to the first element of the first inner Iterator.
Implements Iterator.
Definition at line 53 of file appenditerator.inc.
References getInnerIterator().
00054 { 00055 $this->iterators->rewind(); 00056 if ($this->iterators->valid()) 00057 { 00058 $this->getInnerIterator()->rewind(); 00059 } 00060 }
Here is the call graph for this function:

| AppendIterator::valid | ( | ) |
Implements Iterator.
Definition at line 64 of file appenditerator.inc.
References getInnerIterator().
Referenced by next().
00065 { 00066 return $this->iterators->valid() && $this->getInnerIterator()->valid(); 00067 }
Here is the call graph for this function:

AppendIterator::$iterators [private] |
1.5.2