Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 60 | Rev 291 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 60 Rev 63
Line 15... Line 15...
15
class Taxons extends Eflore {
15
class Taxons extends Eflore {
Line 16... Line 16...
16
 
16
 
17
	public function getStatsInitialesFamille() {
17
	public function getStatsInitialesFamille() {
18
		$url = $this->getUrlStatsInitiales(self::RANG_FAMILLE);
18
		$url = $this->getUrlStatsInitiales(self::RANG_FAMILLE);
-
 
19
		$donnees = $this->chargerDonnees($url);
19
		$donnees = $this->chargerDonnees($url);
20
		if (isset($donnees['Famille'])) {
-
 
21
			$initiales = $donnees['Famille'];
-
 
22
		} elseif (isset($donnees[self::RANG_FAMILLE])) {
-
 
23
			$initiales = $donnees[self::RANG_FAMILLE];
-
 
24
		}
20
		$initiales = $donnees['Famille'];
25
		
21
		return $initiales;
26
		return $initiales;
Line 22... Line 27...
22
	}
27
	}
23
 
28
 
24
	
29
	
25
	public function getStatsInitialesGenre() {
30
	public function getStatsInitialesGenre() {
-
 
31
		$url = $this->getUrlStatsInitiales(self::RANG_GENRE);
-
 
32
		$donnees = $this->chargerDonnees($url);
-
 
33
		$initiales = $donnees['Genre'];
-
 
34
		if (isset($donnees['Genre'])) {
-
 
35
			$initiales = $donnees['Genre'];
26
		$url = $this->getUrlStatsInitiales(self::RANG_GENRE);
36
		} elseif (isset($donnees[self::RANG_GENRE])) {
27
		$donnees = $this->chargerDonnees($url);
37
			$initiales = $donnees[self::RANG_GENRE];
Line 28... Line 38...
28
		$initiales = $donnees['Genre'];
38
		}
29
		return $initiales;
39
		return $initiales;
Line 37... Line 47...
37
	}
47
	}
Line 38... Line 48...
38
 
48
 
39
	public function getListeFamilleParInitiale($lettre) {
49
	public function getListeFamilleParInitiale($lettre) {
40
		$url = $this->getUrlInitiales(self::RANG_FAMILLE, $lettre);
50
		$url = $this->getUrlInitiales(self::RANG_FAMILLE, $lettre);
41
		$donnees = $this->chargerDonneesRecursivement($url);
51
		$donnees = $this->chargerDonneesRecursivement($url);
42
		$taxons = $donnees['resultat'];
52
		$taxons = ($donnees === false) ?  $donnees : $donnees['resultat'];
43
		return $taxons;
53
		return $taxons;
Line 44... Line 54...
44
	}
54
	}
45
	
55
	
46
	public function getListeGenreParInitiale($lettre) {
56
	public function getListeGenreParInitiale($lettre) {
47
		$url = $this->getUrlInitiales(self::RANG_GENRE, $lettre);
57
		$url = $this->getUrlInitiales(self::RANG_GENRE, $lettre);
48
		$donnees = $this->chargerDonneesRecursivement($url);
58
		$donnees = $this->chargerDonneesRecursivement($url);
49
		$taxons = $donnees['resultat'];
59
		$taxons = ($donnees === false) ?  $donnees : $donnees['resultat'];
Line 50... Line 60...
50
		return $taxons;
60
		return $taxons;
51
	}
61
	}