Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev Author Line No. Line
291 jpm 1
<?php
293 delphine 2
class NomCourant {
291 jpm 3
	private $nns = null;
448 delphine 4
	private $nnr = null;
291 jpm 5
	private $selectionne = null;
6
	private $retenu = null;
7
 
8
	public function __construct($num_nom_selectionne, Noms $noms, Taxons $taxons) {
9
		$this->nns = $num_nom_selectionne;
10
		$this->selectionne = new Nom($noms->getNom($this->nns));
11
		$this->retenu = new Nom($taxons->getTaxon($this->nns));
448 delphine 12
		$this->nnr = $this->retenu->get('id');
13
		$this->retenu->setTaxonsSuperieurs($taxons->getTaxonsSup($this->nnr), $this->nnr);
14
		$taxons_sup = $taxons->getTaxonsSup($this->nnr);
15
		$this->taxons_sup = $taxons_sup[$this->nnr];
291 jpm 16
	}
17
 
18
	/**
293 delphine 19
	 * Retour le numéro du nom sélectionné courant.
291 jpm 20
	 *
21
	 * @return le numéro du nom sélectionné.
22
	 */
23
	public function getNns() {
24
		return $this->nns;
25
	}
448 delphine 26
 
27
	public function getNnr() {
28
		return $this->nnr;
29
	}
30
 
291 jpm 31
 
32
	public function getNomSelectionne() {
33
		return $this->selectionne;
34
	}
35
 
36
	public function getNomRetenu() {
361 delphine 37
		return $this->retenu;
291 jpm 38
	}
39
 
40
}
41
?>