Subversion Repositories eFlore/Applications.eflore-consultation

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
291 jpm 1
<?php
2
class Nom {
3
	private $infos = array();
4
 
5
	public function __construct(Array $infos) {
6
		$this->infos = $infos;
7
	}
380 delphine 8
	public function setTaxonsSuperieurs(Array $taxonsSup, $nns) {
9
		$this->infos['taxonsSup'] = $taxonsSup[$nns];
10
	}
321 aurelien 11
 
12
	public function getInfos() {
13
		return $this->infos;
14
	}
291 jpm 15
 
16
	public function get($cle) {
17
		$valeur = '';
18
		if (array_key_exists($cle, $this->infos)) {
19
			$valeur = $this->infos[$cle];
20
		}
21
		return $valeur;
22
	}
380 delphine 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
	}
291 jpm 33
}
34
?>