Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 283 Rev 291
Line 11... Line 11...
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Noms extends Eflore {
15
class Noms extends Eflore {
-
 
16
 
16
	public function getSynonymes($num_nom) {
17
	public function getSynonymes($nn) {
17
		$tpl = Config::get('nomsSynonymesTpl');
18
		$tpl = Config::get('nomsSynonymesTpl');
18
		$params = array('id' => $num_nom);
19
		$params = array('id' => $nn);
19
		$url = $this->formaterUrl($tpl, $params);
20
		$url = $this->formaterUrl($tpl, $params);
20
		return $this->chargerDonnees($url);
21
		return $this->chargerDonnees($url);
21
	}
22
	}
22
	
23
 
-
 
24
	public function getNom($nn) {
-
 
25
		$url = $this->getUrlNom($nn);
-
 
26
		return $this->chargerDonnees($url);
-
 
27
	}
-
 
28
 
23
	public function getRechercheEtendue($nom, $type_resultat = '') {
29
	public function getRechercheEtendue($nom, $type_resultat = '') {
24
		$methode = 'getUrlRecherche'.$type_resultat;
30
		$methode = 'getUrlRecherche'.$type_resultat;
25
		if (method_exists($this, $methode)) {
31
		if (method_exists($this, $methode)) {
26
			$url = $this->$methode($nom, 'etendue');
32
			$url = $this->$methode($nom, 'etendue');
27
		} else {
33
		} else {
Line 34... Line 40...
34
	public function getRechercheFloue($nom) {
40
	public function getRechercheFloue($nom) {
35
		$url = $this->getUrlRecherche($nom, 'floue');
41
		$url = $this->getUrlRecherche($nom, 'floue');
36
		return $this->chargerDonnees($url);
42
		return $this->chargerDonnees($url);
37
	}
43
	}
Line -... Line 44...
-
 
44
 
-
 
45
	private function getUrlNom($nn) {
-
 
46
		$tpl = Config::get('nomTpl');
-
 
47
		$params = array('id' => $nn);
-
 
48
		$url = $this->formaterUrl($tpl, $params);
-
 
49
		return $url;
-
 
50
	}
38
 
51
 
39
	// retourne les champs par defaut
52
	// retourne les champs par defaut
40
	private function getUrlRecherche($nom, $typeRech) {
53
	private function getUrlRecherche($nom, $typeRech) {
41
		$tpl = Config::get('nomsRechercheTpl');
54
		$tpl = Config::get('nomsRechercheTpl');
42
		$params = array('valeur' => $nom, 'type' => $typeRech);
55
		$params = array('valeur' => $nom, 'type' => $typeRech);
43
		$url = $this->formaterUrl($tpl, $params);
56
		$url = $this->formaterUrl($tpl, $params);
44
		return $url;
57
		return $url;
45
	}
58
	}
46
	
59
 
47
	// retourne les champs par defaut
60
	// retourne les champs par defaut
48
	private function getUrlRechercheAlphab($nom, $typeRech) {
61
	private function getUrlRechercheAlphab($nom, $typeRech) {
49
		$tpl = Config::get('nomsRechercheAlphabTpl');
62
		$tpl = Config::get('nomsRechercheAlphabTpl');
50
		$params = array('valeur' => $nom, 'type' => $typeRech);
63
		$params = array('valeur' => $nom, 'type' => $typeRech);
51
		$url = $this->formaterUrl($tpl, $params);
64
		$url = $this->formaterUrl($tpl, $params);
52
		return $url;
65
		return $url;
53
	}
66
	}
54
	
67
 
55
	// retourne les champs par defaut
68
	// retourne les champs par defaut
56
	private function getUrlRechercheRetenu($nom, $typeRech) {
69
	private function getUrlRechercheRetenu($nom, $typeRech) {
57
		$tpl = Config::get('nomsRechercheRetenuTpl');
70
		$tpl = Config::get('nomsRechercheRetenuTpl');
58
		$params = array('valeur' => $nom, 'type' => $typeRech);
71
		$params = array('valeur' => $nom, 'type' => $typeRech);
59
		$url = $this->formaterUrl($tpl, $params);
72
		$url = $this->formaterUrl($tpl, $params);
60
		return $url;
73
		return $url;
61
	}
74
	}
62
	
75
 
63
	private function getUrlRechercheSynonyme($nom, $typeRech) {
76
	private function getUrlRechercheSynonyme($nom, $typeRech) {
64
		$tpl = Config::get('nomsRechercheSynonymeTpl');
77
		$tpl = Config::get('nomsRechercheSynonymeTpl');
65
		$params = array('valeur' => $nom, 'type' => $typeRech);
78
		$params = array('valeur' => $nom, 'type' => $typeRech);
66
		$url = $this->formaterUrl($tpl, $params);
79
		$url = $this->formaterUrl($tpl, $params);
67
		return $url;
80
		return $url;
68
	}
81
	}
69
	
82
 
70
	// retourne les champs par defaut + nom retenu
83
	// retourne les champs par defaut + nom retenu
71
	private function getUrlRechercheDetermination($nom, $typeRech) {
84
	private function getUrlRechercheDetermination($nom, $typeRech) {
72
		$tpl = Config::get('nomsRechercheDeterminationTpl');
85
		$tpl = Config::get('nomsRechercheDeterminationTpl');
73
		$params = array('valeur' => $nom, 'type' => $typeRech);
86
		$params = array('valeur' => $nom, 'type' => $typeRech);
74
		$url = $this->formaterUrl($tpl, $params);
87
		$url = $this->formaterUrl($tpl, $params);
75
		return $url;
88
		return $url;
76
	}
89
	}
77
	
90
 
78
	// retourne les champs par defaut + nom decompose (au, an et bib)
91
	// retourne les champs par defaut + nom decompose (au, an et bib)
79
	private function getUrlRechercheDecompo($nom, $typeRech) {
92
	private function getUrlRechercheDecompo($nom, $typeRech) {
80
		$tpl = Config::get('nomsRechercheDecompoTpl');
93
		$tpl = Config::get('nomsRechercheDecompoTpl');
81
		$params = array('valeur' => $nom, 'type' => $typeRech);
94
		$params = array('valeur' => $nom, 'type' => $typeRech);