Subversion Repositories eFlore/Projets.eflore-projets

Rev

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

Rev Author Line No. Line
163 jpm 1
<?php
2
class NomDecorateur {
3
	protected $nom = null;
4
	protected $nomFormate = array();
5
 
6
	public function __construct(NomDO $nomADecorer) {
7
		$this->nom = $nomADecorer;
8
		$this->initialiserNomFormate();
9
	}
10
 
11
	public function ajouterId() {
12
		$this->nomFormate['id'] = (int) $this->nom->getTag('num_nom');
13
	}
14
 
15
	public function ajouterIntitule() {
16
		$this->nomFormate['nom_sci'] = $this->nom->getTag('nom_sci');
17
	}
18
 
19
	public function ajouterAuteur() {
20
		if ($this->nom->verifierTag('auteur')) {
21
			$this->nomFormate['auteur'] = $this->nom->getTag('auteur');
22
		}
23
	}
24
 
25
	public function ajouterAnnee() {
26
		if ($this->nom->verifierTag('annee')) {
27
			$this->nomFormate['annee'] = $this->nom->getTag('annee');
28
		}
29
	}
30
 
31
	public function ajouterBiblio() {
32
		if ($this->nom->verifierTag('biblio_origine')) {
33
			$this->nomFormate['biblio_origine'] = $this->nom->getTag('biblio_origine');
34
		}
35
	}
36
 
37
	public function ajouterAddendum() {
38
		if ($this->nom->verifierTag('nom_addendum')) {
39
			$this->nomFormate['nom_addendum'] = $this->nom->getTag('nom_addendum');
40
		}
41
	}
42
 
43
	public function ajouterNotes() {
44
		if ($this->nom->verifierTag('notes')) {
45
			$this->nomFormate['notes'] = $this->nom->getTag('notes');
46
		}
47
	}
48
 
49
	public function ajouterHomonyme() {
50
		if ($this->nom->verifierTag('homonyme') && $this->nom->getTag('homonyme') == 1) {
51
			$this->nomFormate['homonyme'] = true;
52
		}
53
	}
54
 
55
	public function initialiserNomFormate() {
56
		$this->nomFormate = array();
57
	}
58
 
59
	public function getNomFormate() {
60
		return $this->nomFormate;
61
	}
62
}
63
?>