children = new ArrayIterator($node->getChildren()); } /** * (non-PHPDoc) * @see \RecursiveIterator::current() For the method documentation. */ public function current() { return $this->children->current(); } /** * (non-PHPDoc) * @see \RecursiveIterator::key() For the method documentation. */ public function key() { return $this->children->key(); } /** * (non-PHPDoc) * @see \RecursiveIterator::next() For the method documentation. */ public function next() { $this->children->next(); } /** * (non-PHPDoc) * @see \RecursiveIterator::rewind() For the method documentation. */ public function rewind() { $this->children->rewind(); } /** * (non-PHPDoc) * @see \RecursiveIterator::valid() For the method documentation. */ public function valid() { return $this->children->valid(); } /** * (non-PHPDoc) * @see \RecursiveIterator::hasChildren() For the method documentation. */ public function hasChildren() { return $this->current()->hasChildren(); } /** * (non-PHPDoc) * @see \RecursiveIterator::getChildren() For the method documentation. */ public function getChildren() { return new static($this->current()); } }