num_available_field = $num_available_field; $this->id = $id; $this->isbd = $isbd; $this->params = $params; $this->fetch_datas_cache(); } /** * Methode permettant de construire l'objet element dans la classe * A ré-implémenter pour faire un new concept ou une new notice ... */ public abstract function set_vedette_element_from_database(); /** * Retourne l'identifiant de l'élément. Pas nécessairement un entier (une URI pour un concept). * @return unknown_type */ public function get_id(){ return $this->id; } /** * Retourne l'identifiant en base de l'élément * @return int */ public function get_db_id(){ if (!$this->db_id) { $this->db_id = $this->id; } return $this->db_id; } public function get_type(){ return $this->type; } public function get_isbd(){ return $this->isbd; } public function get_element(){ return $this->element; } public function get_num_available_field() { return $this->num_available_field; } public static function search_vedette_element_ui_class_name($vedette_element_class_name){ if(class_exists($vedette_element_class_name.'_ui')){ return $vedette_element_class_name.'_ui'; }else{ return 'vedette_element_ui'; } } protected function fetch_datas_cache(){ $tmp=vedette_cache::get_at_vedette_cache($this); if($tmp){ $this->restore($tmp); }else{ $this->set_vedette_element_from_database(); vedette_cache::set_at_vedette_cache($this); } } protected function restore($vedette_object){ foreach(get_object_vars($vedette_object) as $propertieName=>$propertieValue){ $this->{$propertieName}=$propertieValue; } } protected function get_generic_link(){ global $use_opac_url_base, $opac_url_base; if($use_opac_url_base) { return $opac_url_base."index.php?lvl=!!type!!_see&id=!!id!!"; } else { return "./autorites.php?categ=see&sub=!!type!!&id=!!id!!"; } } public function get_entity(){ return $this->entity; } public function get_params() { return $this->params; } }