// Recursion should never happen, should always be stopped at the parent
// DOMNode. Depth limit on the other hand we're going to skip since
// that would show an empty iterator and rather useless. Let the depth
// limit hit the children (DOMNodeList only has DOMNode as children)
if ($trigger & Parser::TRIGGER_RECURSION
) { return;
} $o->size =
$var->length;
if (0 ===
$o->size
) { $o->
replaceRepresentation(new Representation('Iterator'
));
$o->size = null;
return;
} // Depth limit
// Make empty iterator representation since we need it in DOMNode to point out depth limits
if ($this->parser->
getDepthLimit() &&
$o->depth + 1 >=
$this->parser->
getDepthLimit()) { $b =
new Value();
$b->name =
$o->classname.' Iterator Contents';
$b->access_path = 'iterator_to_array('.
$o->access_path.')';