Subversion Repositories eFlore/Applications.del

Rev

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

Rev 826 Rev 841
Line 67... Line 67...
67
		} catch (Exception $e) {
67
		} catch (Exception $e) {
68
			$reponseHttp->ajouterErreur($e);
68
			$reponseHttp->ajouterErreur($e);
69
			$reponseHttp->emettreLesEntetes();
69
			$reponseHttp->emettreLesEntetes();
70
		}
70
		}
71
	}
71
	}
-
 
72
	
-
 
73
	public function modifier($ressources, $requeteDonnees) {
-
 
74
		$this->methode = 'modifier';
-
 
75
		$resultat = '';
-
 
76
		$reponseHttp = new ReponseHttp();
-
 
77
		try {
-
 
78
			$this->initialiserRessourcesEtParametres($ressources, $requeteDonnees);
-
 
79
			$this->conteneur = new Conteneur($this->parametres);
-
 
80
			$resultat = $this->traiterRessources();
-
 
81
		} catch (Exception $e) {
-
 
82
			$reponseHttp->ajouterErreur($e);
-
 
83
			$reponseHttp->emettreLesEntetes();
-
 
84
		}
-
 
85
	}
Line 72... Line 86...
72
 
86
 
73
	private function initialiserRessourcesEtParametres($ressources, $parametres) {
87
	private function initialiserRessourcesEtParametres($ressources, $parametres) {
74
		$this->ressources = $ressources;
88
		$this->ressources = $ressources;
75
		$this->parametres = $parametres;
89
		$this->parametres = $parametres;
Line 176... Line 190...
176
				$service = new $classe($this->conteneur);
190
				$service = new $classe($this->conteneur);
177
				if ($this->methode == 'consulter') {
191
				if ($this->methode == 'consulter') {
178
					$retour = $service->consulter($this->ressources, $this->parametres);
192
					$retour = $service->consulter($this->ressources, $this->parametres);
179
				} elseif ($this->methode == 'ajouter') {
193
				} elseif ($this->methode == 'ajouter') {
180
					$retour = $service->ajouter($this->ressources, $this->parametres);
194
					$retour = $service->ajouter($this->ressources, $this->parametres);
-
 
195
				} elseif ($this->methode == 'modifier') {
-
 
196
					$retour = $service->modifier($this->ressources, $this->parametres);
181
				}
197
				}
182
			}
198
			}
183
		}
199
		}
Line 184... Line 200...
184
		
200