Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 346 | Go to most recent revision | Details | Compare with Previous | 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;
294 delphine 18
	private $nomCourant = null;
291 jpm 19
	private $tailleBloc = "190x178";
257 delphine 20
	private $serviceChorodep = null;
346 gduche 21
	private $cartes;
22
	private $meta;
23
	private $appUrls;
24
 
291 jpm 25
	public function __construct(Conteneur $conteneur) {
26
		$this->conteneur = $conteneur;
294 delphine 27
		$this->nomCourant = $this->conteneur->getNomCourant();
291 jpm 28
		$this->cartes = $this->conteneur->getApiCartes();
29
		$this->meta = $this->conteneur->getApiMetaDonnees();
30
		$this->appUrls = $this->conteneur->getAppUrls();
276 gduche 31
	}
291 jpm 32
 
33
	public function obtenirDonnees() {
34
		$donnees['chorodep'] = $this->getChorodep();
361 delphine 35
		$donnees['eflore'] = $this->getEflore();
269 delphine 36
		return $donnees;
37
	}
291 jpm 38
 
39
	public function getChorodep() {
40
		$this->cartes->setProjet('chorodep');
41
		$this->cartes->setLargeur('630');
294 delphine 42
		$id = 'nn:'.$this->nomCourant->getNns();
291 jpm 43
		$this->cartes->setId($id);
44
		$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg();
45
		$chorodep['pngUrl'] = $this->cartes->getUrlPng();
46
		$chorodep['legende'] = $this->cartes->getLegende();
47
		$this->meta->setProjet('chorodep');
48
		$meta = $this->meta->getMetaDonnees();
49
		$citation = $meta[0]['citation'];
50
		$chorodep['meta']['citation'] = $citation;
51
		$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
52
		return $chorodep;
253 gduche 53
	}
361 delphine 54
 
55
	public function getEflore() {
56
		$this->cartes->setProjet('eflore');
57
		$this->cartes->setLargeur('max');
58
		$this->cartes->setInfoNom($this->nomCourant->getNomRetenu());
59
		$chorodep['mapUrl'] = $this->cartes->getUrlMap();
60
		return $chorodep;
61
	}
291 jpm 62
 
63
	public function getBloc() {
64
		$this->cartes->setProjet('chorodep');
65
		$this->cartes->setLargeur('190x178');
294 delphine 66
		$id = 'nn:'.$this->nomCourant->getNns();
291 jpm 67
		$this->cartes->setId($id);
68
		$donnees['carteUrl'] = $this->cartes->getUrlPng();
69
		return $donnees;
263 gduche 70
	}
253 gduche 71
}
72
?>