Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 283 | Rev 336 | Go to most recent revision | Show entire file | Regard 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
	}
Line -... Line 23...
-
 
23
 
-
 
24
	public function getNom($nn) {
-
 
25
		$url = $this->getUrlNom($nn);
-
 
26
		return $this->chargerDonnees($url);
-
 
27
	}
22
	
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');
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);