Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 778 Rev 816
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
	private $limite;
13
	private $limite;
14
	private $depart;
14
	private $depart;
-
 
15
	private $catminat;
15
	
16
	
16
	
17
	
17
	public function setDepart($depart){
18
	public function setDepart($depart){
18
		$this->depart = $depart;
19
		$this->depart = $depart;
19
	}
20
	}
20
	
21
	
21
	public function setLimite($limite){
22
	public function setLimite($limite){
22
		$this->limite = $limite;
23
		$this->limite = $limite;
23
	}	
24
	}	
24
		
25
		
25
	public function setBdnt($bdnt){
26
	public function setBdnt($bdnt){
26
		$this->bdnt = $bdnt;
27
		$this->bdnt = $bdnt;
27
	}
28
	}
28
	
29
	
29
	public function setNum_nom($nn){
30
	public function setNum_nom($nn){
30
		$this->num_nom = $nn;
31
		$this->num_nom = $nn;
31
	}
32
	}
-
 
33
	
-
 
34
	public function setCatminat($catminat){
-
 
35
		$this->catminat = $catminat;
-
 
36
	}
32
	
37
	
33
	public function getInformations() {	
38
	public function getInformations() {	
34
		$url = $this->getUrlInformation();
39
		$url = $this->getUrlInformation();
35
		return $this->chargerDonnees($url);
40
		return $this->chargerDonnees($url);
36
	}
41
	}
37
	
42
	
38
 
43
 
39
	
44
	
40
	public function getInformationsEcologie() {
45
	public function getInformationsEcologie() {
41
		$url = $this->getUrlInformation();
46
		$url = $this->getUrlInformation();
42
		$url .= '?categorie=ecologie';
47
		$url .= '?categorie=ecologie';
43
		return $this->chargerDonnees($url);
48
		return $this->chargerDonnees($url);
44
	}
49
	}
45
	
50
	
46
	public function getInformationsDescription() {
51
	public function getInformationsDescription() {
47
		$url = $this->getUrlInformation();
52
		$url = $this->getUrlInformation();
48
		$url .= '?categorie=description';
53
		$url .= '?categorie=description';
49
		return $this->chargerDonnees($url);
54
		return $this->chargerDonnees($url);
50
	}
55
	}
-
 
56
		
-
 
57
	public function getInformationsRelationCatminat() {
-
 
58
		$url = $this->getUrlInformationsRelationCatminat();
-
 
59
		return $this->chargerDonnees($url);
-
 
60
	}
-
 
61
	
-
 
62
	public function getInformationsMasqueCatminat() {
-
 
63
		$url = $this->getUrlInformationsMasqueCatminat();
-
 
64
		return $this->chargerDonnees($url);
-
 
65
	}
-
 
66
	
-
 
67
	
51
	
68
	
52
	public function getUrlInformation() {
69
	public function getUrlInformation() {
53
		$tpl = Config::get('informationTpl');
70
		$tpl = Config::get('informationTpl');
54
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
71
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
55
		$url = $this->formaterUrl($tpl, $params);
72
		$url = $this->formaterUrl($tpl, $params);
56
		return $url;
73
		return $url;
57
	}
74
	}
58
	
-
 
59
	public function getInformationsRelationCatminat() {
-
 
60
		$url = $this->getUrlInformationsRelationCatminat();
-
 
61
		return $this->chargerDonnees($url);
-
 
62
	}
-
 
63
	
75
	
64
	public function getUrlInformationsRelationCatminat() {
76
	public function getUrlInformationsRelationCatminat() {
65
		$tpl = Config::get('informationsRelationCatminat');
77
		$tpl = Config::get('informationsRelationCatminat');
66
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom, 'limite' => $this->limite, 'depart' => $this->depart  );
78
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom, 'limite' => $this->limite, 'depart' => $this->depart  );
67
		$url = $this->formaterUrl($tpl, $params);
79
		$url = $this->formaterUrl($tpl, $params);
-
 
80
		return $url;
-
 
81
	}
-
 
82
	
-
 
83
	public function getUrlInformationsMasqueCatminat() {
-
 
84
		$tpl = Config::get('informationsCatminat');
-
 
85
		$params = array( 'catminat' => $this->catminat, 'limite' => $this->limite, 'depart' => $this->depart  );
-
 
86
		$url = $this->formaterUrl($tpl, $params);
68
		return $url;
87
		return $url;
69
	}
88
	}
70
	
89
	
71
 
90
 
72
}
91
}