function &getChildrenFromParent($item)
 {
     $dao =& $this->_getItemDao();
     $itemArray = array();
     $dar = $dao->searchByParentsId(array($item->getId()));
     if ($dar && !$dar->isError()) {
         while ($dar->valid()) {
             $row = $dar->current();
             $itemArray[] = Docman_ItemFactory::getItemFromRow($row);
             $dar->next();
         }
     }
     $iIter = new ArrayIterator($itemArray);
     return $iIter;
 }
 /**
  * Return the list of items associated to on or all reports.
  *
  * @param $reportId If null, consider all reports for the project.
  * @return Array of Docma_Item
  */
 function getReportsItems($reportId = null)
 {
     $itemArray = array();
     $itemFactory = new Docman_ItemFactory($this->groupId);
     $dao =& $this->getDao();
     $dar = $dao->searchItemsInReports($this->groupId, $reportId);
     while ($dar->valid()) {
         $itemArray[] = $itemFactory->getItemFromRow($dar->current());
         $dar->next();
     }
     return $itemArray;
 }