14,6 → 14,11 |
*/ |
class Taxons extends Eflore { |
|
public function getTaxon($nn) { |
$url = $this->getUrlTaxon($nn); |
return $this->chargerDonnees($url); |
} |
|
public function getStatsInitialesFamille() { |
$url = $this->getUrlStatsInitiales(self::RANG_FAMILLE); |
$donnees = $this->chargerDonnees($url); |
22,11 → 27,17 |
} elseif (isset($donnees[self::RANG_FAMILLE])) { |
$initiales = $donnees[self::RANG_FAMILLE]; |
} |
|
|
return $initiales; |
} |
|
|
private function getUrlTaxon($nn) { |
$tpl = Config::get('taxonTpl'); |
$params = array('id' => $nn); |
$url = $this->formaterUrl($tpl, $params); |
return $url; |
} |
|
public function getStatsInitialesGenre() { |
$url = $this->getUrlStatsInitiales(self::RANG_GENRE); |
$donnees = $this->chargerDonnees($url); |
38,7 → 49,7 |
} |
return $initiales; |
} |
|
|
private function getUrlStatsInitiales($rang) { |
$tpl = Config::get('taxonsStatsInitialesRangTpl'); |
$params = array('rang' => $rang); |
52,7 → 63,7 |
$taxons = ($donnees === false) ? $donnees : $donnees['resultat']; |
return $taxons; |
} |
|
|
public function getListeGenreParInitiale($lettre) { |
$url = $this->getUrlInitiales(self::RANG_GENRE, $lettre); |
$donnees = $this->chargerDonneesRecursivement($url); |
59,7 → 70,7 |
$taxons = ($donnees === false) ? $donnees : $donnees['resultat']; |
return $taxons; |
} |
|
|
private function getUrlInitiales($rang, $lettre) { |
$tpl = Config::get('taxonsListeInitialesRangTpl'); |
$params = array('rang' => $rang, 'initiale' => $lettre); |
66,17 → 77,17 |
$url = $this->formaterUrl($tpl, $params); |
return $url; |
} |
|
|
public function getRechercheEtendue($nom) { |
$url = $this->getUrlRecherche($nom, 'etendue'); |
return $this->chargerDonnees($url); |
} |
|
|
public function getRechercheFloue($nom) { |
$url = $this->getUrlRecherche($nom, 'floue'); |
return $this->chargerDonnees($url); |
} |
|
|
private function getUrlRecherche($nom, $typeRech) { |
$tpl = Config::get('taxonsRechercheTpl'); |
$params = array('valeur' => $nom, 'type' => $typeRech); |