Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
53 delphine 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe gérant les noms scientifiques.
5
 *
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
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
13
 * @version		$Id$
14
 */
15
class NomsVernaculaires extends Eflore {
301 jpm 16
 
284 aurelien 17
	public function getRechercheComplete($num_tax) {
18
		$tpl = Config::get('nomsVernaRechercheCompleteTpl');
19
		$params = array('valeur' => $num_tax, 'projet' => 'nvjfl');
20
		$url = $this->formaterUrl($tpl, $params);
21
		return $this->chargerDonnees($url);
22
	}
301 jpm 23
 
165 delphine 24
	public function getRechercheEtendue($nom, $type_resultat = '') {
25
		$methode = 'getUrlRecherche'.$type_resultat;
26
		if (method_exists($this, $methode)) {
27
			$url = $this->$methode($nom, 'etendue');
28
		} else {
29
			$url = $this->getUrlRecherche($nom, 'etendue');
30
			Debug::printr("Le type de recherche demandé '$type_resultat' n'est pas disponible.");
31
		}
53 delphine 32
		return $this->chargerDonnees($url);
33
	}
301 jpm 34
 
165 delphine 35
	public function getRechercheFloue($nom, $type_resultat = '') {
53 delphine 36
		$url = $this->getUrlRecherche($nom, 'floue');
37
		return $this->chargerDonnees($url);
38
	}
301 jpm 39
 
53 delphine 40
	private function getUrlRecherche($nom, $typeRech) {
41
		$tpl = Config::get('nomsVernaRechercheTpl');
196 delphine 42
		$params = array('valeur' => $nom, 'type' => $typeRech, 'langue' => 'fra');
53 delphine 43
		$url = $this->formaterUrl($tpl, $params);
44
		return $url;
45
	}
301 jpm 46
 
165 delphine 47
	private function getUrlRechercheDetermination($nom, $typeRech) {
196 delphine 48
		$tpl = Config::get('nomsVernaRechercheDeterminationTpl');
49
		$params = array('valeur' => $nom, 'type' => $typeRech, 'langue' => 'fra');
165 delphine 50
		$url = $this->formaterUrl($tpl, $params);
51
		return $url;
52
	}
53 delphine 53
}
54
?>