Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
253 gduche 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 Repartition extends aControleur {
291 jpm 16
 
17
	private $conteneur = null;
18
	private $nomCourrant = null;
19
	private $tailleBloc = "190x178";
257 delphine 20
	private $serviceChorodep = null;
291 jpm 21
 
22
	public function __construct(Conteneur $conteneur) {
23
		$this->conteneur = $conteneur;
24
		$this->nomCourrant = $this->conteneur->getNomCourrant();
25
		$this->cartes = $this->conteneur->getApiCartes();
26
		$this->meta = $this->conteneur->getApiMetaDonnees();
27
		$this->appUrls = $this->conteneur->getAppUrls();
276 gduche 28
	}
291 jpm 29
 
30
	public function obtenirDonnees() {
31
		$donnees['chorodep'] = $this->getChorodep();
269 delphine 32
		return $donnees;
33
	}
291 jpm 34
 
35
	public function getChorodep() {
36
		$this->cartes->setProjet('chorodep');
37
		$this->cartes->setLargeur('630');
38
		$id = 'nn:'.$this->nomCourrant->getNns();
39
		$this->cartes->setId($id);
40
		$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg();
41
		$chorodep['pngUrl'] = $this->cartes->getUrlPng();
42
		$chorodep['legende'] = $this->cartes->getLegende();
43
		$this->meta->setProjet('chorodep');
44
		$meta = $this->meta->getMetaDonnees();
45
		$citation = $meta[0]['citation'];
46
		$chorodep['meta']['citation'] = $citation;
47
		$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
48
		return $chorodep;
253 gduche 49
	}
291 jpm 50
 
51
	public function getBloc() {
52
		$this->cartes->setProjet('chorodep');
53
		$this->cartes->setLargeur('190x178');
54
		$id = 'nn:'.$this->nomCourrant->getNns();
55
		$this->cartes->setId($id);
56
		$donnees['carteUrl'] = $this->cartes->getUrlPng();
57
		return $donnees;
263 gduche 58
	}
253 gduche 59
}
60
?>