| 265 |
aurelien |
1 |
<?php
|
|
|
2 |
// declare(encoding='UTF-8');
|
|
|
3 |
/**
|
|
|
4 |
* Classe mère du module fiche metadonnées.
|
|
|
5 |
*
|
|
|
6 |
* @category PHP 5.2
|
|
|
7 |
* @package eflore-consultation
|
|
|
8 |
* @author Aurélien Peronnet <aurelien@tela-botanica.org>
|
|
|
9 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
10 |
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
|
|
|
11 |
* @copyright 2011 Tela-Botanica
|
|
|
12 |
* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
|
|
|
13 |
* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
|
|
|
14 |
* @version $Id$
|
|
|
15 |
*/
|
|
|
16 |
class FicheMetadonnees extends aControleur {
|
| 288 |
jpm |
17 |
|
|
|
18 |
private $projet = '';
|
| 265 |
aurelien |
19 |
private $serviceMetaDonnees;
|
| 288 |
jpm |
20 |
|
| 265 |
aurelien |
21 |
public function __construct($metadonnees = null) {
|
|
|
22 |
$this->capturerParametres();
|
|
|
23 |
$this->serviceMetaDonnees = (is_null($this->serviceMetaDonnees)) ? new MetaDonnees($this->projet) : $metadonnees;
|
|
|
24 |
}
|
| 288 |
jpm |
25 |
|
| 265 |
aurelien |
26 |
public function executerActionParDefaut() {
|
|
|
27 |
$this->executerAffichageMetaDonnees();
|
|
|
28 |
}
|
| 288 |
jpm |
29 |
|
| 265 |
aurelien |
30 |
public function chargerMetadonneesHtml() {
|
|
|
31 |
$donnees['metadonnees'] = $this->serviceMetaDonnees->getMetaDonnees();
|
|
|
32 |
$html = $this->getVue(dirname(__FILE__).'/squelettes/metadonnees', $donnees);
|
|
|
33 |
return $html;
|
|
|
34 |
}
|
| 288 |
jpm |
35 |
|
| 265 |
aurelien |
36 |
public function executerAffichageMetaDonnees($donnees) {
|
| 960 |
delphine |
37 |
header('Content-type: text/html; charset=UTF-8');
|
| 270 |
aurelien |
38 |
$html = $this->chargerMetadonneesHtml();
|
| 265 |
aurelien |
39 |
echo $html;
|
|
|
40 |
exit;
|
|
|
41 |
}
|
| 288 |
jpm |
42 |
|
| 265 |
aurelien |
43 |
private function capturerParametres() {
|
|
|
44 |
if (isset($_GET['projet'])) {
|
|
|
45 |
$this->projet = $_GET['projet'];
|
|
|
46 |
}
|
|
|
47 |
}
|
|
|
48 |
}
|
|
|
49 |
?>
|