Subversion Repositories eFlore/Applications.del

Rev

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

Rev 2215 Rev 2216
Line 43... Line 43...
43
class Observations extends RestService {
43
class Observations extends RestService {
Line 44... Line 44...
44
 
44
 
45
	private $parametres = array();
45
	private $parametres = array();
46
	private $ressources = array();
46
	private $ressources = array();
47
	private $methode = null;
47
	private $methode = null;
48
	private $serviceNom = 'observations';
48
	private $serviceNom = 'tepik';
49
	private $sousServiceNom = null;
49
	private $sousServiceNom = null;
Line 50... Line 50...
50
	private $cheminCourant = null;
50
	private $cheminCourant = null;
Line 116... Line 116...
116
		} else if (count($this->ressources) == 1) {
116
		} else if (count($this->ressources) == 1) {
117
			if ($this->etreRessourceIdentifiant(0)) {
117
			if ($this->etreRessourceIdentifiant(0)) {
118
				// http://localhost/service:del:0.1/observations/#idObs
118
				// http://localhost/service:del:0.1/observations/#idObs
119
				$this->sousServiceNom = 'observation-details';
119
				$this->sousServiceNom = 'observation-details';
120
			}
120
			}
121
		} else if (count($this->ressources) == 3) {
-
 
122
			if ($this->etreRessourceIdentifiant(0) && $this->etreRessourceIdentifiant(1) && $this->verifierRessourceValeur(2, 'vote')) {
-
 
123
				// http://localhost/service:del:0.1/observations/#idObs/#idProposition/vote/
-
 
124
				$this->sousServiceNom = 'vote-observation';
-
 
125
			}
-
 
126
		}
121
		} 
127
 
-
 
128
		if ($this->sousServiceNom == null) {
122
		if ($this->sousServiceNom == null) {
129
			$this->lancerMessageErreurRessource();
123
			$this->lancerMessageErreurRessource();
130
		}
124
		}
131
	}
125
	}
Line 134... Line 128...
134
		if (count($this->ressources) == 1) {
128
		if (count($this->ressources) == 1) {
135
			if ($this->methode == 'modifier' && $this->etreRessourceIdentifiant(0)) {
129
			if ($this->methode == 'modifier' && $this->etreRessourceIdentifiant(0)) {
136
				// http://localhost/service:del:0.1/observations/#idObs
130
				// http://localhost/service:del:0.1/observations/#idObs
137
				$this->sousServiceNom = 'observation-details';
131
				$this->sousServiceNom = 'observation-details';
138
			}
132
			}
139
		} else if (count($this->ressources) == 3) {
-
 
140
			if ($this->etreRessourceIdentifiant(0) && $this->etreRessourceIdentifiant(1) && $this->verifierRessourceValeur(2, 'vote')) {
-
 
141
				// http://localhost/service:del:0.1/observations/#idObs/#idProposition/vote/
-
 
142
				$this->sousServiceNom = 'vote-observation';
-
 
143
			}
-
 
144
		}
133
		}
145
 
134
		
146
		if ($this->sousServiceNom == null) {
135
		if ($this->sousServiceNom == null) {
147
			$this->lancerMessageErreurRessource();
136
			$this->lancerMessageErreurRessource();
148
		}
137
		}
149
	}
138
	}