Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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