Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 422 Rev 540
Line 14... Line 14...
14
 */
14
 */
15
class Ecologie extends aControleur {
15
class Ecologie extends aControleur {
16
	public function __construct(Conteneur $conteneur) {
16
	public function __construct(Conteneur $conteneur) {
17
		$this->conteneur = $conteneur;
17
		$this->conteneur = $conteneur;
18
		$this->nomCourant = $this->conteneur->getNomCourant();
18
		$this->nomCourant = $this->conteneur->getNomCourant();
-
 
19
		$this->informations = $this->conteneur->getApiInformations();
-
 
20
		$this->meta = $this->conteneur->getApiMetaDonnees();
19
		$this->wikini = $this->conteneur->getApiWikini();
21
		$this->wikini = $this->conteneur->getApiWikini();
-
 
22
		$this->appUrls = $this->conteneur->getAppUrls();
20
	}
23
	}
Line 21... Line 24...
21
	
24
	
22
	public function obtenirDonnees() {
25
	public function obtenirDonnees() {
23
		$donnees = array();
26
		$donnees = array();
-
 
27
		$donnees['wikini'] = $this->getWikini();
24
		$donnees['wikini'] = $this->getWikini();
28
		$donnees['baseflor'] = $this->getBaseflor();
25
		return $donnees;
29
		return $donnees;
Line 26... Line 30...
26
	}
30
	}
27
	
31
	
Line 32... Line 36...
32
		$num_tax = $this->nomCourant->getNomSelectionne()->get('num_taxonomique');
36
		$num_tax = $this->nomCourant->getNomSelectionne()->get('num_taxonomique');
33
		$page_wiki = $this->wikini->getPageWikiPourRefEtNumTax($referentiel, $num_tax);
37
		$page_wiki = $this->wikini->getPageWikiPourRefEtNumTax($referentiel, $num_tax);
34
		$wikini['ecologie'] = $this->wikini->getTexteFormate($page_wiki, 'ecologie');
38
		$wikini['ecologie'] = $this->wikini->getTexteFormate($page_wiki, 'ecologie');
35
		return $wikini;
39
		return $wikini;
36
	}
40
	}
-
 
41
	
-
 
42
	private function getBaseflor() {
-
 
43
		$baseflor = array();
-
 
44
		$this->informations ->setProjet('baseflor');
-
 
45
		$this->informations ->setBdnt($this->conteneur->getParametre('referentiel'));
-
 
46
		$this->informations ->setNum_nom($this->conteneur->getParametre('num_nom'));
-
 
47
		$informations = $this->informations->getInformations();
-
 
48
		if($informations != ""){
-
 
49
			$baseflor['climat_url'] = $informations['graphique_climat']['href']."?retour.format=500";
-
 
50
			$baseflor['sol_url'] = $informations['graphique_sol']['href']."?retour.format=500";
-
 
51
			$this->meta->setProjet('baseflor');
-
 
52
			$meta = $this->meta->getMetaDonnees();
-
 
53
			$citation = $meta[0]['citation'];
-
 
54
			$baseflor['meta']['citation'] = $citation;
-
 
55
			$baseflor['meta']['url'] = $this->appUrls->obtenirUrlMetaDonnees('baseflor');
-
 
56
		}else {
-
 
57
			$baseflor['aucune'] = 'Aucunes données';
-
 
58
		}
-
 
59
		return $baseflor;
-
 
60
	}
37
}
61
}
38
?>
62
?>
39
63