/** * Sets the new node children queue used in stages 2 and 3 of the compilation. * * @param SplQueue|Opt_Xml_Scannable $children The children list. */ public function setChildren($children) { if ($children instanceof SplQueue) { if ($children->count() > 0) { $this->_newQueue = $children; } } else { if ($children instanceof Opt_Xml_Scannable) { if ($children->hasChildren() > 0) { $this->_newQueue = new SplQueue(); foreach ($children as $child) { $this->_newQueue->enqueue($child); } } } } }