Subversion Repositories eFlore/Applications.eflore-consultation

Rev

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

Rev 1230 Rev 1565
1
<?php
1
<?php
2
class NomCourant {
2
class NomCourant {
3
	private $nns = null;
3
	private $nns = null;
4
	private $nnr = null;
4
	private $nnr = null;
5
	private $selectionne = null;
5
	private $selectionne = null;
6
	private $retenu = null;
6
	private $retenu = null;
7
 
7
 
8
	public function __construct($num_nom_selectionne, Noms $noms, Taxons $taxons) {
8
	public function __construct($num_nom_selectionne, Noms $noms, Taxons $taxons) {
9
		
9
		
10
		$this->nns = $num_nom_selectionne;
10
		$this->nns = $num_nom_selectionne;
11
		$this->selectionne = new Nom($noms->getNom($this->nns));
11
		$this->selectionne = new Nom($noms->getNom($this->nns));
12
		$this->retenu = new Nom($taxons->getTaxon($this->nns));
12
		$this->retenu = new Nom($taxons->getTaxon($this->nns));
13
		$this->nnr = $this->retenu->get('id');
13
		$this->nnr = $this->retenu->get('id');
14
		$taxons_sup = $taxons->getTaxonsSup($this->nnr);
14
		$taxons_sup = $taxons->getTaxonsSup($this->nnr);
-
 
15
		if ($taxons_sup != false) {
15
		$this->taxons_sup = $taxons_sup[$this->nnr];
16
			$this->taxons_sup = $taxons_sup[$this->nnr];
16
		$this->retenu->setTaxonsSuperieurs($taxons_sup, $this->nnr);
17
			$this->retenu->setTaxonsSuperieurs($taxons_sup, $this->nnr);
-
 
18
		}
17
	}
19
	}
18
 
20
 
19
	/**
21
	/**
20
	 * Retour le numéro du nom sélectionné courant.
22
	 * Retour le numéro du nom sélectionné courant.
21
	 *
23
	 *
22
	 * @return le numéro du nom sélectionné.
24
	 * @return le numéro du nom sélectionné.
23
	 */
25
	 */
24
	public function getNns() {
26
	public function getNns() {
25
		return $this->nns;
27
		return $this->nns;
26
	}
28
	}
27
	
29
	
28
	public function getNnr() {
30
	public function getNnr() {
29
		return $this->nnr;
31
		return $this->nnr;
30
	}
32
	}
31
	
33
	
32
 
34
 
33
	public function getNomSelectionne() {
35
	public function getNomSelectionne() {
34
		return $this->selectionne;
36
		return $this->selectionne;
35
	}
37
	}
36
 
38
 
37
	public function getNomRetenu() {
39
	public function getNomRetenu() {
38
		return $this->retenu;
40
		return $this->retenu;
39
	}
41
	}
40
	
42
	
41
	public function getNt() {
43
	public function getNt() {
42
		return $this->retenu->get('num_taxonomique');
44
		return $this->retenu->get('num_taxonomique');
43
	}
45
	}
44
	
46
	
45
	public function getInpn() {
47
	public function getInpn() {
46
		return $this->selectionne->get('cd_nom');
48
		return $this->selectionne->get('cd_nom');
47
	}
49
	}
48
 
50
 
49
}
51
}
50
?>
-
 
51
52
?>
-
 
53