Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 602 | Rev 778 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 602 Rev 636
1
<?php
1
<?php
2
/**
2
/**
3
 * 
3
 * 
4
 * classe gérant des informations (descriptives, écologiques )
4
 * classe gérant des informations (descriptives, écologiques )
5
 * 
5
 * 
6
 * @author mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
6
 * @author mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
7
 *
7
 *
8
 */
8
 */
9
class Informations extends Eflore {
9
class Informations extends Eflore {
10
	
10
	
11
	private $bdnt;
11
	private $bdnt;
12
	private $num_nom;
12
	private $num_nom;
13
	
13
	
14
	
14
	
15
		
15
		
16
	public function setBdnt($bdnt){
16
	public function setBdnt($bdnt){
17
		$this->bdnt = $bdnt;
17
		$this->bdnt = $bdnt;
18
	}
18
	}
19
	
19
	
20
	public function setNum_nom($nn){
20
	public function setNum_nom($nn){
21
		$this->num_nom = $nn;
21
		$this->num_nom = $nn;
22
	}
22
	}
23
	
23
	
24
	public function getInformations() {	
24
	public function getInformations() {	
25
		$url = $this->getUrlInformation();
25
		$url = $this->getUrlInformation();
26
		return $this->chargerDonnees($url);
26
		return $this->chargerDonnees($url);
27
	}
27
	}
28
	
28
	
29
	public function getInformationsEcologie() {
29
	public function getInformationsEcologie() {
30
		$url = $this->getUrlInformation();
30
		$url = $this->getUrlInformation();
31
		$url .= '?champs=ecologie';
31
		$url .= '?categorie=ecologie';
32
		return $this->chargerDonnees($url);
32
		return $this->chargerDonnees($url);
33
	}
33
	}
34
	
34
	
35
	public function getInformationsDescription() {
35
	public function getInformationsDescription() {
36
		$url = $this->getUrlInformation();
36
		$url = $this->getUrlInformation();
37
		$url .= '?champs=description';
37
		$url .= '?categorie=description';
38
		return $this->chargerDonnees($url);
38
		return $this->chargerDonnees($url);
39
	}
39
	}
40
	
40
	
41
	public function getUrlInformation() {
41
	public function getUrlInformation() {
42
		$tpl = Config::get('informationTpl');
42
		$tpl = Config::get('informationTpl');
43
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
43
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
44
		$url = $this->formaterUrl($tpl, $params);
44
		$url = $this->formaterUrl($tpl, $params);
45
		return $url;
45
		return $url;
46
	}
46
	}
47
	
47
	
48
	
48
	
49
 
49
 
50
}
50
}