ar = $menuNode->getChildren(); } public function rewind() { reset($this->ar); } public function valid() { return !is_null(key($this->ar)); } public function key() { return key($this->ar); } public function next() { next($this->ar); } public function current() { return current($this->ar); } public function hasChildren() { $current = current($this->ar); return $current->hasChildren(); } public function getChildren() { return new RokMenuIterator($this->current()); } }