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 Ethnobotanique extends aControleur {
|
302 |
jpm |
16 |
|
|
|
17 |
private $conteneur = null;
|
|
|
18 |
private $nomCourant = null;
|
|
|
19 |
private $nomsVernaculaires = null;
|
|
|
20 |
|
|
|
21 |
public function __construct(Conteneur $conteneur) {
|
|
|
22 |
$this->conteneur = $conteneur;
|
|
|
23 |
$this->nomCourant = $this->conteneur->getNomCourant();
|
|
|
24 |
$this->nomsVernaculaires = $this->conteneur->getApiNomsVernaculaires();
|
307 |
jpm |
25 |
$this->meta = $this->conteneur->getApiMetaDonnees();
|
|
|
26 |
$this->appUrls = $this->conteneur->getAppUrls();
|
284 |
aurelien |
27 |
}
|
302 |
jpm |
28 |
|
|
|
29 |
public function obtenirDonnees() {
|
306 |
jpm |
30 |
$donnees['nvjfl'] = $this->getNvjfl();
|
|
|
31 |
return $donnees;
|
|
|
32 |
}
|
|
|
33 |
|
|
|
34 |
private function getNvjfl() {
|
307 |
jpm |
35 |
$nvjfl = array();
|
302 |
jpm |
36 |
$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
|
306 |
jpm |
37 |
$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
|
307 |
jpm |
38 |
$nvjfl['noms'] = $nomsVerna['resultat'];
|
|
|
39 |
$this->meta->setProjet('nvjfl');
|
|
|
40 |
$meta = $this->meta->getMetaDonnees();
|
|
|
41 |
$titreMeta = $meta[0]['titre'];
|
|
|
42 |
$nvjfl['meta']['titre'] = $titreMeta;
|
|
|
43 |
$nvjfl['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('nvjfl');
|
|
|
44 |
return $nvjfl;
|
272 |
delphine |
45 |
}
|
306 |
jpm |
46 |
|
|
|
47 |
public function getBloc() {
|
|
|
48 |
$nt = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
|
|
|
49 |
$nomsVerna = $this->nomsVernaculaires->getRechercheComplete($nt);
|
|
|
50 |
$donnees['nomsVernaNbre'] = count($nomsVerna['resultat']);
|
|
|
51 |
return $donnees;
|
|
|
52 |
}
|
272 |
delphine |
53 |
}
|
|
|
54 |
?>
|