13,7 → 13,23 |
* @version $Id$ |
*/ |
class Images extends Eflore { |
|
private $nntaxon; |
private $limite; |
private $depart; |
|
public function setNnTaxon($nntax) { |
$this->nntaxon = $nntax; |
} |
|
public function setLimite($limite) { |
$this->limite = $limite; |
} |
|
public function setDepart($depart) { |
$this->depart = $depart; |
} |
|
//TODO: créer des fonctions spécifiques cel et photoflora pour plus de clarté ? |
public function getUrlsImagesParIdsNoms(Array $idsNoms) { |
$infosImages = $this->getInfosImagesParIdsNoms($idsNoms); |
39,7 → 55,22 |
$url = $this->formaterUrl($tpl, array('id' => $id_image)); |
return $this->chargerDonnees($url); |
} |
|
public function getInfosImages() { |
$url = $this->getUrlImages(); |
$donnees = $this->chargerDonnees($url); |
$images = (empty($donnees['resultats']) == false) ? $donnees['resultats'] : array(); |
return $images; |
} |
|
public function getInfosImagesTaxons() { |
$url = $this->getUrlImagesTaxons(); |
$donnees = $this->chargerDonnees($url); |
$images = (empty($donnees['resultats']) == false) ? $donnees['resultats'] : array(); |
return $images; |
} |
|
|
private function getUrlImagesParIdsNoms($idsNoms) { |
$tpl = Config::get('imagesResultatsDeterminationTpl'); |
$params = array('idsNoms' => implode(',', $idsNoms)); |
53,5 → 84,19 |
$url = $this->formaterUrl($tpl, $params); |
return $this->chargerDonnees($url); |
} |
|
private function getUrlImages() { |
$tpl = Config::get('imagesTpl'); |
$params = array('projet' => $this->getProjet(), 'limite' => $this->limite, 'depart' => $this->depart); |
$url = $this->formaterUrl($tpl, $params); |
return $url; |
} |
|
private function getUrlImagesTaxons() { |
$tpl = Config::get('imagesTaxonsTpl'); |
$params = array('projet' => $this->getProjet(),'nntaxon'=> $this->nntaxon); |
$url = $this->formaterUrl($tpl, $params); |
return $url; |
} |
} |
?> |