protected $it;
protected $current;
protected $key;
- protected $more;
+ protected $valid;
protected $strValue;
- protected $getStrVal;
function __construct(Iterator $it, $flags = CIT_CALL_TOSTRING)
{
$this->it = $it;
$this->flags = $flags & (CIT_CALL_TOSTRING|CIT_CATCH_GET_CHILD);
+ $this->next();
}
function rewind()
function next()
{
- if ($this->more = $this->it->valid()) {
+ if ($this->valid = $this->it->valid()) {
$this->current = $this->it->current();
$this->key = $this->it->key();
if ($this->flags & CIT_CALL_TOSTRING) {
function valid()
{
- return $this->more;
+ return $this->valid;
}
function hasNext()
{
protected $hasChildren;
protected $getChildren;
- protected $catch_get_child;
function __construct(RecursiveIterator $it, $flags = CIT_CALL_TOSTRING)
{
parent::__construct($it, $flags);
}
+ function rewind();
+ {
+ $this->hasChildren = false;
+ $this->getChildren = NULL;
+ parent::rewind();
+ }
+
function next()
{
if ($this->hasChildren = $this->it->hasChildren()) {