45 $this->_objList = array();
46 $this->_objIdList = array();
47 $this->_currentObj = &$obj;
56 $childrenArray = $this->_currentObj->getChildren();
59 if (sizeOf($this->_objList) != 0)
62 $this->_currentObj = & $this->_objList[sizeOf($this->_objList)-1];
63 array_pop($this->_objList);
95 $this->_objList = array();
96 $this->_objIdList = array();
97 $this->_currentObj = &$obj;
107 for ($i=sizeOf($objList)-1;$i>=0;$i--)
109 if (is_a($objList[$i],
'node') || is_a($objList[$i],
'Node'))
111 if (!in_array($objList[$i]->getOID(), $this->_objIdList))
113 $this->_objList[sizeOf($this->_objList)] = &$objList[$i];
114 array_push($this->_objIdList, $objList[$i]->getOID());
NodeIterator is used to iterate over a tree/list build of objects using a Depth-First-Algorithm. Classes used with the NodeIterator must implement the getChildren() and getOID() methods. NodeIterator implements the 'Iterator Pattern'. The base class NodeIterator defines the interface for all specialized Iterator classes.