Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 291 | Rev 326 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
272 delphine 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * Classe mère du module Liste.
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 Nomenclature extends aControleur {
291 jpm 16
 
17
	private $conteneur = null;
294 delphine 18
	private $nomCourant = null;
291 jpm 19
	private $noms = null;
20
	private $meta = null;
21
 
22
	public function __construct(Conteneur $conteneur) {
23
		$this->conteneur = $conteneur;
294 delphine 24
		$this->nomCourant = $this->conteneur->getNomCourant();
291 jpm 25
		$this->noms = $this->conteneur->getApiNoms();
26
		$this->appUrls = $this->conteneur->getAppUrls();
272 delphine 27
	}
291 jpm 28
 
29
	public function obtenirDonnees() {
30
		$donnees = array();
31
		$donnees['synonymes'] = $this->getSynonymes();
272 delphine 32
		return $donnees;
33
	}
291 jpm 34
 
35
	public function getBloc() {
36
		$synonymes = $this->getSynonymes();
37
		$donnees['synonymesNbre'] = count($synonymes);
38
		return $donnees;
39
	}
40
 
41
	private function getSynonymes() {
294 delphine 42
		$nns = $this->nomCourant->getNns();
291 jpm 43
		$synonymes = $this->noms->getSynonymes($nns);
44
		return $synonymes['resultat'];
45
	}
272 delphine 46
}
47
?>