Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 291 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 291 Rev 294
1
<?php
1
<?php
2
// declare(encoding='UTF-8');
2
// declare(encoding='UTF-8');
3
/**
3
/**
4
 * Classe mère du module Liste.
4
 * Classe mère du module Liste.
5
 *
5
 *
6
 * @category	PHP 5.2
6
 * @category	PHP 5.2
7
 * @package		eflore-consultation
7
 * @package		eflore-consultation
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
9
 * @author		Delphine CAUQUIL <delphine@tela-botanica.org>
10
 * @copyright	2011 Tela-Botanica
10
 * @copyright	2011 Tela-Botanica
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL-v3
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
12
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL-v2
13
 * @version		$Id$
13
 * @version		$Id$
14
 */
14
 */
15
class Repartition extends aControleur {
15
class Repartition extends aControleur {
16
 
16
 
17
	private $conteneur = null;
17
	private $conteneur = null;
18
	private $nomCourrant = null;
18
	private $nomCourant = null;
19
	private $tailleBloc = "190x178";
19
	private $tailleBloc = "190x178";
20
	private $serviceChorodep = null;
20
	private $serviceChorodep = null;
21
 
21
 
22
	public function __construct(Conteneur $conteneur) {
22
	public function __construct(Conteneur $conteneur) {
23
		$this->conteneur = $conteneur;
23
		$this->conteneur = $conteneur;
24
		$this->nomCourrant = $this->conteneur->getNomCourrant();
24
		$this->nomCourant = $this->conteneur->getNomCourant();
25
		$this->cartes = $this->conteneur->getApiCartes();
25
		$this->cartes = $this->conteneur->getApiCartes();
26
		$this->meta = $this->conteneur->getApiMetaDonnees();
26
		$this->meta = $this->conteneur->getApiMetaDonnees();
27
		$this->appUrls = $this->conteneur->getAppUrls();
27
		$this->appUrls = $this->conteneur->getAppUrls();
28
	}
28
	}
29
 
29
 
30
	public function obtenirDonnees() {
30
	public function obtenirDonnees() {
31
		$donnees['chorodep'] = $this->getChorodep();
31
		$donnees['chorodep'] = $this->getChorodep();
32
		return $donnees;
32
		return $donnees;
33
	}
33
	}
34
 
34
 
35
	public function getChorodep() {
35
	public function getChorodep() {
36
		$this->cartes->setProjet('chorodep');
36
		$this->cartes->setProjet('chorodep');
37
		$this->cartes->setLargeur('630');
37
		$this->cartes->setLargeur('630');
38
		$id = 'nn:'.$this->nomCourrant->getNns();
38
		$id = 'nn:'.$this->nomCourant->getNns();
39
		$this->cartes->setId($id);
39
		$this->cartes->setId($id);
40
		$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg();
40
		$chorodep['svgUrl'] = $this->cartes->getUrlDataSvg();
41
		$chorodep['pngUrl'] = $this->cartes->getUrlPng();
41
		$chorodep['pngUrl'] = $this->cartes->getUrlPng();
42
		$chorodep['legende'] = $this->cartes->getLegende();
42
		$chorodep['legende'] = $this->cartes->getLegende();
43
		$this->meta->setProjet('chorodep');
43
		$this->meta->setProjet('chorodep');
44
		$meta = $this->meta->getMetaDonnees();
44
		$meta = $this->meta->getMetaDonnees();
45
		$citation = $meta[0]['citation'];
45
		$citation = $meta[0]['citation'];
46
		$chorodep['meta']['citation'] = $citation;
46
		$chorodep['meta']['citation'] = $citation;
47
		$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
47
		$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
48
		return $chorodep;
48
		return $chorodep;
49
	}
49
	}
50
 
50
 
51
	public function getBloc() {
51
	public function getBloc() {
52
		$this->cartes->setProjet('chorodep');
52
		$this->cartes->setProjet('chorodep');
53
		$this->cartes->setLargeur('190x178');
53
		$this->cartes->setLargeur('190x178');
54
		$id = 'nn:'.$this->nomCourrant->getNns();
54
		$id = 'nn:'.$this->nomCourant->getNns();
55
		$this->cartes->setId($id);
55
		$this->cartes->setId($id);
56
		$donnees['carteUrl'] = $this->cartes->getUrlPng();
56
		$donnees['carteUrl'] = $this->cartes->getUrlPng();
57
		return $donnees;
57
		return $donnees;
58
	}
58
	}
59
}
59
}
60
?>
60
?>