Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 163 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 163 Rev 215
Line 25... Line 25...
25
	public function consulter($ressources, $parametres) {
25
	public function consulter($ressources, $parametres) {
26
		$resultat = '';
26
		$resultat = '';
27
		$reponseHttp = new ReponseHttp();
27
		$reponseHttp = new ReponseHttp();
28
		try {
28
		try {
29
			$this->initialiserConteneur($ressources, $parametres);
29
			$this->initialiserConteneur($ressources, $parametres);
30
			$resultat = $this->executerProjetService();
30
			$projet = $this->conteneur->getProjet();
-
 
31
			$projet->verifier();
-
 
32
			$resultat = $projet->consulter();
31
			$reponseHttp->setResultatService($resultat);
33
			$reponseHttp->setResultatService($resultat);
32
		} catch (Exception $e) {
34
		} catch (Exception $e) {
33
			$reponseHttp->ajouterErreur($e);
35
			$reponseHttp->ajouterErreur($e);
34
		}
36
		}
35
		$reponseHttp->emettreLesEntetes();
37
		$reponseHttp->emettreLesEntetes();
Line 41... Line 43...
41
		$this->conteneur = new Conteneur();
43
		$this->conteneur = new Conteneur();
42
		$this->conteneur->setParametre('ressources', $ressources);
44
		$this->conteneur->setParametre('ressources', $ressources);
43
		$this->conteneur->setParametre('parametres', $parametres);
45
		$this->conteneur->setParametre('parametres', $parametres);
44
		$this->conteneur->setParametre('cheminBase', dirname(__FILE__).DS);
46
		$this->conteneur->setParametre('cheminBase', dirname(__FILE__).DS);
45
	}
47
	}
46
 
-
 
47
	private function executerProjetService() {
-
 
48
		$projet = $this->conteneur->getProjet();
-
 
49
		$projet->verifier();
-
 
50
		$classe = $projet->getServiceClasseNom();
-
 
51
		$service = $this->conteneur->getService($classe);
-
 
52
		$retour = $service->consulter();
-
 
53
		return $retour;
-
 
54
	}
-
 
55
}
48
}
56
?>
49
?>
57
50