Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Rev 321 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 321 Rev 380
1
<?php
1
<?php
2
class Nom {
2
class Nom {
3
	private $infos = array();
3
	private $infos = array();
4
 
4
 
5
	public function __construct(Array $infos) {
5
	public function __construct(Array $infos) {
6
		$this->infos = $infos;
6
		$this->infos = $infos;
7
	}
7
	}
-
 
8
	public function setTaxonsSuperieurs(Array $taxonsSup, $nns) {
-
 
9
		$this->infos['taxonsSup'] = $taxonsSup[$nns];
-
 
10
	}
8
	
11
	
9
	public function getInfos() {
12
	public function getInfos() {
10
		return $this->infos;
13
		return $this->infos;
11
	}
14
	}
12
 
15
 
13
	public function get($cle) {
16
	public function get($cle) {
14
		$valeur = '';
17
		$valeur = '';
15
		if (array_key_exists($cle, $this->infos)) {
18
		if (array_key_exists($cle, $this->infos)) {
16
			$valeur = $this->infos[$cle];
19
			$valeur = $this->infos[$cle];
17
		}
20
		}
18
		return $valeur;
21
		return $valeur;
19
	}
22
	}
-
 
23
	
-
 
24
	public function getTaxonSupRang($rang) {
-
 
25
		$nom_sci = '';
-
 
26
		foreach ($this->infos['taxonsSup'] as $taxon) {
-
 
27
			if ($taxon['rang.code'] == 'bdnt.rangTaxo:'.$rang) {
-
 
28
				$nom_sci = $taxon['nom_sci_complet'];
-
 
29
			}
-
 
30
		}
-
 
31
		return $nom_sci;
-
 
32
	}
20
}
33
}
21
?>
34
?>