Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 302 Rev 306
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère du module Liste.
4
 * Classe mère du module Liste.
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 Ethnobotanique extends aControleur {
15
class Ethnobotanique extends aControleur {
16
 
16
 
17
	private $conteneur = null;
17
	private $conteneur = null;
18
	private $nomCourant = null;
18
	private $nomCourant = null;
19
	private $nomsVernaculaires = null;
19
	private $nomsVernaculaires = null;
20
 
20
 
21
	public function __construct(Conteneur $conteneur) {
21
	public function __construct(Conteneur $conteneur) {
22
		$this->conteneur = $conteneur;
22
		$this->conteneur = $conteneur;
23
		$this->nomCourant = $this->conteneur->getNomCourant();
23
		$this->nomCourant = $this->conteneur->getNomCourant();
24
		$this->nomsVernaculaires = $this->conteneur->getApiNomsVernaculaires();
24
		$this->nomsVernaculaires = $this->conteneur->getApiNomsVernaculaires();
25
	}
25
	}
26
 
26
 
27
	public function obtenirDonnees() {
27
	public function obtenirDonnees() {
-
 
28
		$donnees['nvjfl'] = $this->getNvjfl();
-
 
29
		return $donnees;
-
 
30
	}
-
 
31
 
-
 
32
	private function getNvjfl() {
-
 
33
		$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
-
 
34
		$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
-
 
35
		$donnees['noms'] = $nomsVerna['resultat'];
-
 
36
		return $donnees;
-
 
37
	}
-
 
38
 
-
 
39
	public function getBloc() {
28
		$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
40
		$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
29
		$donnees = $this->nomsVernaculaires->getRechercheComplete($nt);
41
		$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
-
 
42
		$donnees['nomsVernaNbre'] = count($nomsVerna['resultat']);
30
		return $donnees;
43
		return $donnees;
31
	}
44
	}
32
}
45
}
33
?>
46
?>