Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 276 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 276 Rev 291
Line 11... Line 11...
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
	private $serviceChorodep = null;
-
 
Line -... Line 16...
-
 
16
 
17
	
17
	private $conteneur = null;
-
 
18
	private $nomCourrant = null;
18
	public function __construct($num_nom = null, $type = null, $taille = 630) {
19
	private $tailleBloc = "190x178";
19
		$this->initialiser($num_nom, $type, $taille);
-
 
Line 20... Line 20...
20
	}
20
	private $serviceChorodep = null;
-
 
21
 
21
	
22
	public function __construct(Conteneur $conteneur) {
-
 
23
		$this->conteneur = $conteneur;
22
	public function initialiser($num_nom, $type, $taille = 630) {
24
		$this->nomCourrant = $this->conteneur->getNomCourrant();
-
 
25
		$this->cartes = $this->conteneur->getApiCartes();
23
		$this->serviceChorodep = new Cartes('chorodep', $num_nom, $type, $taille);
26
		$this->meta = $this->conteneur->getApiMetaDonnees();
Line 24... Line 27...
24
		$this->serviceMetaDonneesChorodep = new MetaDonnees('chorodep');
27
		$this->appUrls = $this->conteneur->getAppUrls();
25
	}
-
 
26
	
-
 
27
	public function obtenirDonnees($num_nom, $type = 'nn') {
-
 
28
		$this->initialiser($num_nom, $type);
28
	}
29
		$donnees['svg'] = $this->getUrlDataSvg();
-
 
30
		$donnees['png'] = $this->getUrlPng();
29
 
31
		$donnees['legende'] = $this->getLegende();
30
	public function obtenirDonnees() {
Line 32... Line 31...
32
		$donnees['metadonnees'] = $this->getMetaDonnees();
31
		$donnees['chorodep'] = $this->getChorodep();
-
 
32
		return $donnees;
-
 
33
	}
-
 
34
 
-
 
35
	public function getChorodep() {
33
		return $donnees;
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();
34
	}
45
		$citation = $meta[0]['citation'];
35
	
46
		$chorodep['meta']['citation'] = $citation;
36
	public function getUrlDataSvg() {
47
		$chorodep['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('chorodep');
37
		return $this->serviceChorodep->getUrlDataSvg();
48
		return $chorodep;
38
	}
-
 
39
	
-
 
40
	public function getUrlPng() {
49
	}
41
		return $this->serviceChorodep->getUrlPng();
50
 
42
	}
-
 
43
	
-
 
44
	public function getLegende () {
51
	public function getBloc() {
45
		return $this->serviceChorodep->getLegende();
52
		$this->cartes->setProjet('chorodep');
-
 
53
		$this->cartes->setLargeur('190x178');
46
	}
54
		$id = 'nn:'.$this->nomCourrant->getNns();
47
	
55
		$this->cartes->setId($id);
48
	public function getMetaDonnees () {
56
		$donnees['carteUrl'] = $this->cartes->getUrlPng();
49
		return $this->serviceMetaDonneesChorodep->getMetaDonnees();
57
		return $donnees;