showList(); } $this->object = new DataObjects_Objectclass; $this->object->get('cn',$request); $this->object->getSup(); $this->object->getAttributes(); $this->object->flattenAttributes(); $this->object->loadSups(); // echo "
";
        // print_r($this->object);
    }
    
    var $classes = array();
    
    function showList() {
        $this->template = 'ldap/objectclassTree.html';
        
        //DB_DataObject::debuglevel(1);
        $obj = new DataObjects_Objectclass;
        $obj->selectAdd();
        $obj->selectAdd("sup,cn");
        $obj->orderBy('cn');
        $obj->find();
        while($obj->fetch()) {
           
            $obj->children = array();
            $this->classes[$obj->cn] = clone($obj);
        }
       // echo "
" ; print_r($this->classes);
        $this->tree = array();
        foreach(array_keys($this->classes) as $cn) {
            
            if (empty($this->classes[$cn]->sup[0])) {
                // top level;
                $this->tree[] = $this->classes[$cn];
                continue;
            }
            $this->classes[$this->classes[$cn]->sup]->children[] = &$this->classes[$cn];
        
        }
        
        // $this->outputTree();
    }
    
    function outputTree($base = false) {
        //echo "TREE";
        if ($base === false) {
            $base = $this->tree;
        }
        echo "";
    }
    
    
    function outputDependancyTree() {
        $ar = $this->object;
        while(!empty($ar->sup[0])) {
            $old = $ar;
            $ar= $ar->supObject;
            $ar->children = array($old);
        }
        //echo "
";
       // print_r($ar);
        //echo "
";
        $this->tree = array($ar);
        $this->outputTree();
    }
        
        
    
     
}