Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 44 | Rev 60 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 44 Rev 53
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe gérant les noms scientifiques.
4
 * Classe gérant les noms scientifiques.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
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
	
17
	public function getStatsInitialesFamille() {
17
	public function getStatsInitialesFamille() {
18
		$url = $this->getUrlStatsInitiales(180);
18
		$url = $this->getUrlStatsInitiales(180);
19
		return $this->chargerDonnees($url);
19
		return $this->chargerDonnees($url);
20
	}
20
	}
21
	
21
	
22
	public function getStatsInitialesGenre() {
22
	public function getStatsInitialesGenre() {
23
		$url = $this->getUrlStatsInitiales(220);
23
		$url = $this->getUrlStatsInitiales(220);
24
		return $this->chargerDonnees($url);
24
		return $this->chargerDonnees($url);
25
	}
25
	}
26
	
26
	
27
	private function getUrlStatsInitiales($rang) {
27
	private function getUrlStatsInitiales($rang) {
28
		$tpl = Config::get('nomsStatsInitialesRangTpl');
28
		$tpl = Config::get('nomsStatsInitialesRangTpl');
29
		$projet = Registre::get('parametres.referentiel');
29
		$projet = Registre::get('parametres.referentiel');
30
		Debug::printr($projet);
30
		Debug::printr($projet);
31
		$params = array('projet' => $projet, 'rang' => $rang);
31
		$params = array('projet' => $projet, 'rang' => $rang);
32
		$url = $this->formaterUrl($tpl, $params);
32
		$url = $this->formaterUrl($tpl, $params);
33
		return $url;
33
		return $url;
34
	}
34
	}
-
 
35
	
-
 
36
	public function getRechercheEtendue($nom) {
-
 
37
		$url = $this->getUrlRecherche($nom, 'etendue');
-
 
38
		return $this->chargerDonnees($url);
-
 
39
	}
-
 
40
	
-
 
41
	public function getRechercheFloue($nom) {
-
 
42
		$url = $this->getUrlRecherche($nom, 'floue');
-
 
43
		return $this->chargerDonnees($url);
-
 
44
	}
-
 
45
	
-
 
46
	private function getUrlRecherche($nom, $typeRech) {
-
 
47
		$tpl = Config::get('nomsRechercheTpl');
-
 
48
		$projet = Registre::get('parametres.referentiel');
-
 
49
		Debug::printr($projet);
-
 
50
		$params = array('projet' => $projet, 'valeur' => $nom, 'type' => $typeRech);
-
 
51
		$url = $this->formaterUrl($tpl, $params);
-
 
52
		return $url;
-
 
53
	}
35
}
54
}
36
?>
55
?>