config = $config; $this->id_thesaurus = $config['used_thesaurus']; $this->only_with_notices = $config['only_with_notices']; $this->get_restricted_objects($config['included_sets']); $this->getRootNode(); } public function getRootNode(){ $this->rootNode = new RootNode($this->config); } public function get_restricted_objects($restrict_sets){ if($this->restricted_objects == ""){ if(is_countable($restrict_sets) && count($restrict_sets)){ $tab =array(); for ($i=0 ; $iget_values()); $tab = array_unique($tab); } $this->restricted_objects = implode(",",$tab); $tab = array(); } } } protected function get_restricted_objects_query() { return "select notice_id as object_id from notices"; } public function getNodeForPath($path) { global $charset; $path = trim($path,'/'); if (isset($this->cache[$path])) return $this->cache[$path]; $currentNode = $this->rootNode; $currentNode->restricted_objects = $this->restricted_objects; $currentNode->parentNode = null; $i=0; // We're splitting up the path variable into folder/subfolder components and traverse to the correct node.. $exploded_path = explode('/',$path); for($i=0 ; $igetChild($pathPart); $currentNode->set_parent($parent); } $this->cache[$path] = $currentNode; return $currentNode; } }