Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 536 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 536 Rev 837
Line 26... Line 26...
26
	protected $requete_condition = null;
26
	protected $requete_condition = null;
27
	protected $retour_format = 'max';
27
	protected $retour_format = 'max';
28
	protected $table_retour = array();
28
	protected $table_retour = array();
29
	protected $format_reponse = 'metaDonnees';
29
	protected $format_reponse = 'metaDonnees';
30
	protected $table_ressources;
30
	protected $table_ressources;
-
 
31
	static $cache_ontologies = array();
Line 31... Line 32...
31
 
32
 
32
 
33
 
33
	public function consulter($ressources, $parametres) {
34
	public function consulter($ressources, $parametres) {
Line 417... Line 418...
417
	public function ajouterSignification($champ, $val, $nom = 'nom') {
418
	public function ajouterSignification($champ, $val, $nom = 'nom') {
418
		$url = $this->ajouterHrefAutreProjet($champ, '', $val);
419
		$url = $this->ajouterHrefAutreProjet($champ, '', $val);
419
		if (in_array($champ, array('langue', 'langue_meta', 'couverture_spatiale'))) {
420
		if (in_array($champ, array('langue', 'langue_meta', 'couverture_spatiale'))) {
420
			$url .= '/'.$nom;
421
			$url .= '/'.$nom;
421
		}
422
		}
-
 
423
		if(array_key_exists($url, self::$cache_ontologies)) {
-
 
424
			return self::$cache_ontologies[$url];
-
 
425
		}
422
		$signification = $this->consulterHref($url);
426
		$signification = $this->consulterHref($url);
423
		if (isset($signification->$nom)) {
427
		if (isset($signification->$nom)) {
424
			$res = $signification->$nom;
428
			$res = $signification->$nom;
425
		} else {
429
		} else {
426
			$nom = 'nom.fr';
430
			$nom = 'nom.fr';
427
			$res = $signification->$nom;
431
			$res = $signification->$nom;
428
		}
432
		}
-
 
433
		self::$cache_ontologies[$url] = $res;
429
		return $res ;
434
		return $res ;
430
	}
435
	}
Line 431... Line 436...
431
 
436
 
Line 512... Line 517...
512
	public function afficherVersionLangueMetaGuid(&$version) {
517
	public function afficherVersionLangueMetaGuid(&$version) {
513
		$this->table_retour['version'] = $version['version'];
518
		$this->table_retour['version'] = $version['version'];
514
		$this->table_retour['langue_meta'] = $version['langue_meta'];
519
		$this->table_retour['langue_meta'] = $version['langue_meta'];
515
		$this->table_retour['guid'] = $version['guid'];
520
		$this->table_retour['guid'] = $version['guid'];
516
	}
521
	}
517
 
-
 
518
 
-
 
519
 
-
 
520
 
-
 
521
}
522
}
522
 
-
 
523
?>
-
 
524
523