Subversion Repositories eFlore/Projets.eflore-projets

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
206 jpm 1
<?php
215 jpm 2
class NomDetailsGenerique {
206 jpm 3
 
4
	private $parametres = null;
5
	private $ressources = null;
208 jpm 6
	private $nomDao = null;
7
	private $nomFormateur = null;
206 jpm 8
	private $nom = array();
9
 
208 jpm 10
	public function __construct(Ressources $ressources, Parametres $parametres, NomDAO $nomDao, NomFormateur $nomFormateur) {
206 jpm 11
		$this->ressources = $ressources;
12
		$this->parametres = $parametres;
208 jpm 13
		$this->nomDao = $nomDao;
14
		$this->nomFormateur = $nomFormateur;
206 jpm 15
	}
16
 
17
	public function consulter() {
208 jpm 18
		$this->nom = $this->nomDao->rechercherInfosNom();
19
		$retour = $this->formaterDetails();
206 jpm 20
		return $retour;
21
	}
22
 
208 jpm 23
	private function formaterDetails() {
24
		$this->nomFormateur->setNomAFormater($this->nom);
25
		$this->nomFormateur->setChampsRetour($this->parametres->getListe('retour.champs'));
26
		$details = $this->nomFormateur->formaterDetails();
206 jpm 27
		return $details;
28
	}
29
}
30
?>