Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Go to most recent revision | Details | 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;
542 mathilde 15
 
16
 
778 mathilde 17
	public function setDepart($depart){
18
		$this->depart = $depart;
19
	}
20
 
21
	public function setLimite($limite){
22
		$this->limite = $limite;
23
	}
575 mathilde 24
 
542 mathilde 25
	public function setBdnt($bdnt){
26
		$this->bdnt = $bdnt;
27
	}
28
 
29
	public function setNum_nom($nn){
30
		$this->num_nom = $nn;
31
	}
32
 
33
	public function getInformations() {
34
		$url = $this->getUrlInformation();
35
		return $this->chargerDonnees($url);
36
	}
37
 
778 mathilde 38
 
39
 
602 mathilde 40
	public function getInformationsEcologie() {
41
		$url = $this->getUrlInformation();
636 mathilde 42
		$url .= '?categorie=ecologie';
602 mathilde 43
		return $this->chargerDonnees($url);
44
	}
45
 
46
	public function getInformationsDescription() {
47
		$url = $this->getUrlInformation();
636 mathilde 48
		$url .= '?categorie=description';
602 mathilde 49
		return $this->chargerDonnees($url);
50
	}
51
 
542 mathilde 52
	public function getUrlInformation() {
53
		$tpl = Config::get('informationTpl');
54
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom );
55
		$url = $this->formaterUrl($tpl, $params);
56
		return $url;
57
	}
602 mathilde 58
 
778 mathilde 59
	public function getInformationsRelationCatminat() {
60
		$url = $this->getUrlInformationsRelationCatminat();
61
		return $this->chargerDonnees($url);
62
	}
602 mathilde 63
 
778 mathilde 64
	public function getUrlInformationsRelationCatminat() {
65
		$tpl = Config::get('informationsRelationCatminat');
66
		$params = array( 'bdnt' => $this->bdnt, 'num_nom' => $this->num_nom, 'limite' => $this->limite, 'depart' => $this->depart  );
67
		$url = $this->formaterUrl($tpl, $params);
68
		return $url;
69
	}
70
 
575 mathilde 71
 
542 mathilde 72
}