Subversion Repositories eFlore/Applications.eflore-consultation

Compare Revisions

Ignore whitespace Rev 1114 → Rev 1115

/trunk/modules/mobile/sources/Illustrations.php
29,6 → 29,8
$this->images = $this->conteneur->getApiImages();
$this->appUrls = $this->conteneur->getAppUrls();
$this->meta = $this->conteneur->getApiMetaDonnees();
 
$this->images->setApi(Images::API_DEL);
}
 
public function getDonnees() {
43,26 → 45,12
}
 
public function getPhotos() {
$url_picto = $this->obtenirUrlPicto();
$obj = json_decode(file_get_contents($url_picto), true);
 
$listePhotos = $obj['resultats'];
//echo '<pre>'.print_r($obj, true).'</pre>';
$listePhotos = $this->images->getInfosImagesGalerieMobile($this->nomCourant->getNnr());
foreach($listePhotos as $index) {
$this->formaterListePhotos($index);
}
}
 
 
public function obtenirUrlPicto() {
//TODO : passer les valeurs dans le fichier de config
$url_picto = "http://www.tela-botanica.org/eflore/del/services/0.1/images?navigation.depart=0"
."&navigation.limite=4&masque.nn=".$this->nomCourant->getNnr()
."&tri=votes&ordre=desc&protocole=3&format=CRS";
 
return ($url_picto);
}
 
private function formaterListePhotos($images) {
$infosImg['src'] = $images['binaire.href'];
 
110,7 → 98,8
$tax = $this->nomCourant->getNomRetenu()->get('num_taxonomique');
$this->images->setProjet($projet);
$this->images->setNnTaxon($tax);
$costeImg = $this->images->getInfosImagesTaxons();
$costeImg = $this->images->setApi(Eflore::API_EFLORE)->getInfosImagesTaxons();
$this->images->setApi(Eflore::API_DEL);
 
if (count($costeImg) != 0) {
$img['src'] = $costeImg[key($costeImg)]['binaire.href'];