Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 778 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
542 mathilde 1
<?php
2
/**
3
 *
4
 * classe gérant des informations (descriptives, écologiques )
5
 *
6
 * @author mathilde SALTHUN-LASSALLE <mathilde@tela-botanica.org>
7
 *
8
 */
9
class Informations extends Eflore {
10
 
11
	private $bdnt;
12
	private $num_nom;
778 mathilde 13
	private $limite;
14
	private $depart;
816 mathilde 15
	private $catminat;
542 mathilde 16
 
17
 
778 mathilde 18
	public function setDepart($depart){
19
		$this->depart = $depart;
20
	}
21
 
22
	public function setLimite($limite){
23
		$this->limite = $limite;
24
	}
575 mathilde 25
 
542 mathilde 26
	public function setBdnt($bdnt){
27
		$this->bdnt = $bdnt;
28
	}
29
 
30
	public function setNum_nom($nn){
31
		$this->num_nom = $nn;
32
	}
33
 
816 mathilde 34
	public function setCatminat($catminat){
35
		$this->catminat = $catminat;
36
	}
37
 
542 mathilde 38
	public function getInformations() {
39
		$url = $this->getUrlInformation();
40
		return $this->chargerDonnees($url);
41
	}
42
 
778 mathilde 43
 
44
 
602 mathilde 45
	public function getInformationsEcologie() {
46
		$url = $this->getUrlInformation();
636 mathilde 47
		$url .= '?categorie=ecologie';
602 mathilde 48
		return $this->chargerDonnees($url);
49
	}
50
 
51
	public function getInformationsDescription() {
52
		$url = $this->getUrlInformation();
636 mathilde 53
		$url .= '?categorie=description';
602 mathilde 54
		return $this->chargerDonnees($url);
55
	}
816 mathilde 56
 
57
	public function getInformationsRelationCatminat() {
58
		$url = $this->getUrlInformationsRelationCatminat();
59
		return $this->chargerDonnees($url);
60
	}
602 mathilde 61
 
816 mathilde 62
	public function getInformationsMasqueCatminat() {
63
		$url = $this->getUrlInformationsMasqueCatminat();
64
		return $this->chargerDonnees($url);
65
	}
66
 
67
 
68
 
542 mathilde 69
	public function getUrlInformation() {
70
		$tpl = Config::get('informationTpl');
71
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
72
		$url = $this->formaterUrl($tpl, $params);
73
		return $url;
74
	}
602 mathilde 75
 
778 mathilde 76
	public function getUrlInformationsRelationCatminat() {
77
		$tpl = Config::get('informationsRelationCatminat');
78
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom, 'limite' => $this->limite, 'depart' => $this->depart  );
79
		$url = $this->formaterUrl($tpl, $params);
80
		return $url;
81
	}
82
 
816 mathilde 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);
87
		return $url;
88
	}
89
 
575 mathilde 90
 
542 mathilde 91
}