Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 369 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 369 Rev 618
Line 24... Line 24...
24
		$this->surligneur = (is_null($surligneur)) ? new Surligneur() : $surligneur;
24
		$this->surligneur = (is_null($surligneur)) ? new Surligneur() : $surligneur;
25
		$this->trieur = (is_null($trieur)) ? new Trieur() : $trieur;
25
		$this->trieur = (is_null($trieur)) ? new Trieur() : $trieur;
26
		$this->urls = (is_null($urls)) ? new AppUrls() : $urls;
26
		$this->urls = (is_null($urls)) ? new AppUrls() : $urls;
27
		$this->manipulateurDeChaine = is_null($manipulateurDeChaine) ? new ChaineManipulateur() : $manipulateurDeChaine;
27
		$this->manipulateurDeChaine = is_null($manipulateurDeChaine) ? new ChaineManipulateur() : $manipulateurDeChaine;
28
		$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService;
28
		$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService;
29
		$this->chargerRepartition();
-
 
-
 
29
	
30
	}
30
	}
Line 31... Line 31...
31
 
31
 
32
	private function chargerRepartition($nn) {
32
	private function chargerRepartition() {
33
		$conteneur = new Conteneur();
33
		$conteneur = new Conteneur();
34
		$cartesWs = $conteneur->getApiCartes();
34
		$cartesWs = $conteneur->getApiCartes();
35
		$cartesWs->setProjet('chorodep');
35
		$cartesWs->setProjet('chorodep');
36
		$cartesWs->setLargeur('108x101');
36
		$cartesWs->setLargeur('108x101');
Line 57... Line 57...
57
	}
57
	}
Line 58... Line 58...
58
 
58
 
59
	public function formater() {
59
	public function formater() {
60
		$this->obtenirUrlsPhotos();
60
		$this->obtenirUrlsPhotos();
-
 
61
		$this->extraireInfosNomsPourTplDetermination();
-
 
62
		$this->obtenirUrlsImagesCoste();
-
 
63
		$this->chargerRepartition();
-
 
64
	}
-
 
65
	
-
 
66
	private function obtenirUrlsImagesCoste() {
-
 
67
		$this->extraireInfosTaxons();
-
 
68
		$this->imagesService->setProjet('coste');
-
 
69
		foreach ($this->infosPourTpl['taxons'] as $nn => $tax) {
-
 
70
			$this->imagesService->setNnTaxon($tax);
-
 
71
			$costeImg = $this->imagesService->getInfosImagesTaxons();
-
 
72
			if (!empty($costeImg)) {
-
 
73
				foreach ($costeImg as  $infos) {
-
 
74
					$num_taxon = $infos['num_taxonomique'];
-
 
75
					$images[$num_taxon][] = $infos['binaire.href'];
-
 
76
					$this->infosPourTpl['imagesCoste'] = $images;
-
 
77
				}
-
 
78
			}
-
 
79
		}
-
 
80
		
-
 
81
	}
-
 
82
	
-
 
83
	private function extraireInfosTaxons() {
-
 
84
		foreach ($this->noms as $id => $nom ) {
-
 
85
			if (array_key_exists('num_taxon', $nom) 
-
 
86
				&& array_key_exists('taxon', $nom)) {
-
 
87
				$this->infosPourTpl['taxons'][$nom['taxon']] = $nom['num_taxon'];
-
 
88
			}
61
		$this->extraireInfosNomsPourTplDetermination();
89
		}
Line 62... Line 90...
62
	}
90
	}
63
 
91