_nodes = array(); $this->_current = 0; $this->_currentNode = 0; $this->count = 0; } function addNode(Varien_Db_Tree_Node $node) { $this->_nodes[$this->_currentNode] = $node; $this->count++; return ++$this->_currentNode; } function count() { return $this->count; } function valid() { return isset($this->_nodes[$this->_current]); } function next() { if ($this->_current > $this->_currentNode) { return false; } else { return $this->_current++; } } function key() { return $this->_current; } function current() { return $this->_nodes[$this->_current]; } function rewind() { $this->_current = 0; } }