/** * (PHP 5 >= 5.0.0)<br/> * Move forward to next element * @link http://php.net/manual/en/iterator.next.php * @return void Any returned value is ignored. */ public function next() { $aNodes = $this->_oCurrent->getChilds(); foreach ($aNodes as $oNode) { array_push($this->_aStack, $oNode); } $this->_oCurrent = array_pop($this->_aStack); }
/** * @see AM_Tree_NodeInterface::addChild() * @param AM_Model_Db_Base_NestedSet $oNode * @return AM_Model_Db_Base_NestedSet */ public final function addChild(AM_Tree_Node_Interface $oNode) { $this->_aNodes[] = $oNode; $oNode->setParent($this); return $this; }