26,10 → 26,10 |
$this->urls = (is_null($urls)) ? new AppUrls() : $urls; |
$this->manipulateurDeChaine = is_null($manipulateurDeChaine) ? new ChaineManipulateur() : $manipulateurDeChaine; |
$this->imagesService = is_null($imagesService) ? new Images($this->parametres->projetImg) : $imagesService; |
$this->chargerRepartition(); |
|
} |
|
private function chargerRepartition($nn) { |
private function chargerRepartition() { |
$conteneur = new Conteneur(); |
$cartesWs = $conteneur->getApiCartes(); |
$cartesWs->setProjet('chorodep'); |
59,7 → 59,35 |
public function formater() { |
$this->obtenirUrlsPhotos(); |
$this->extraireInfosNomsPourTplDetermination(); |
$this->obtenirUrlsImagesCoste(); |
$this->chargerRepartition(); |
} |
|
private function obtenirUrlsImagesCoste() { |
$this->extraireInfosTaxons(); |
$this->imagesService->setProjet('coste'); |
foreach ($this->infosPourTpl['taxons'] as $nn => $tax) { |
$this->imagesService->setNnTaxon($tax); |
$costeImg = $this->imagesService->getInfosImagesTaxons(); |
if (!empty($costeImg)) { |
foreach ($costeImg as $infos) { |
$num_taxon = $infos['num_taxonomique']; |
$images[$num_taxon][] = $infos['binaire.href']; |
$this->infosPourTpl['imagesCoste'] = $images; |
} |
} |
} |
|
} |
|
private function extraireInfosTaxons() { |
foreach ($this->noms as $id => $nom ) { |
if (array_key_exists('num_taxon', $nom) |
&& array_key_exists('taxon', $nom)) { |
$this->infosPourTpl['taxons'][$nom['taxon']] = $nom['num_taxon']; |
} |
} |
} |
|
private function obtenirUrlsPhotos() { |
$nns = $this->extraireNnDesNoms(); |