Subversion Repositories eFlore/Projets.eflore-projets

Rev

Rev 274 | Rev 653 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 274 Rev 536
Line 25... Line 25...
25
	private $projetNom = array();
25
	private $projetNom = array();
26
	/** Nom du service demandé. */
26
	/** Nom du service demandé. */
27
	private $serviceNom = array();
27
	private $serviceNom = array();
28
	/** Chemin vers le dossier courrant. */
28
	/** Chemin vers le dossier courrant. */
29
	private $cheminCourrant = null;
29
	private $cheminCourrant = null;
-
 
30
	
-
 
31
	private $cache;
-
 
32
	
30
	/** Indique si oui (true) ou non (false), on veut utiliser les paramètres brutes. */
33
	/** Indique si oui (true) ou non (false), on veut utiliser les paramètres brutes. */
31
	protected $utilisationParametresBruts = true;
34
	protected $utilisationParametresBruts = true;
Line 32... Line 35...
32
 
35
 
33
	public function __construct() {
36
	public function __construct() {
Line 171... Line 174...
171
		$service = null;
174
		$service = null;
172
		foreach ($chemins as $chemin) {
175
		foreach ($chemins as $chemin) {
173
			if (file_exists($chemin)) {
176
			if (file_exists($chemin)) {
174
				$service = new $classe($this->getBdd());
177
				$service = new $classe($this->getBdd());
175
				$ressourcesPourService = $this->filtrerRessourcesPourService();
178
				$ressourcesPourService = $this->filtrerRessourcesPourService();
-
 
179
				$this->cache = new CacheEflore($service, $this->projetNom, $this->serviceNom, Config::get('cache'));
176
				$retour = $service->consulter($ressourcesPourService, $this->parametres);
180
				$retour = $this->cache->consulter($ressourcesPourService, $this->parametres);
177
			}
181
			}
178
		}
182
		}
179
		if (is_null($service)) {
183
		if (is_null($service)) {
180
			$message = "La service demandé '{$this->serviceNom}' n'existe pas dans le projet {$this->projetNom} !";
184
			$message = "La service demandé '{$this->serviceNom}' n'existe pas dans le projet {$this->projetNom} !";
181
			$code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;
185
			$code = RestServeur::HTTP_CODE_RESSOURCE_INTROUVABLE;