Subversion Repositories Applications.framework

Rev

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

Rev 337 Rev 338
Line 32... Line 32...
32
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
32
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
33
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
33
 * @copyright	Copyright (c) 2010, Tela Botanica (accueil@tela-botanica.org)
34
 * @license	GPL v3 <http://www.gnu.org/licenses/gpl.txt>
34
 * @license	GPL v3 <http://www.gnu.org/licenses/gpl.txt>
35
 * @license	CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
35
 * @license	CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
36
 * @since 		0.3
36
 * @since 		0.3
37
 * @version	$Id: RestServeur.php 337 2011-03-30 09:14:13Z aurelien $
37
 * @version	$Id: RestServeur.php 338 2011-03-30 09:17:35Z aurelien $
38
 * @link		/doc/framework/
38
 * @link		/doc/framework/
39
 */
39
 */
40
// TODO : gerer les retours : dans ce controleur : code retour et envoi ...
40
// TODO : gerer les retours : dans ce controleur : code retour et envoi ...
41
class RestServeur {
41
class RestServeur {
Line 338... Line 338...
338
 
338
 
339
	private function post() {
339
	private function post() {
Line 340... Line 340...
340
		$paires = $this->parserDonneesRequete();
340
		$paires = $this->parserDonneesRequete();
341
 
341
 
342
		if (count($paires) != 0) {
342
		if (count($paires) != 0) {
343
			if (isset($paires['action']) && $paires['action'] == 'DELETE') {// Altnative à l'utilisation de DELETE
343
			if (isset($paires['action']) && $paires['action'] == 'DELETE') {// Alternative à l'utilisation de DELETE
344
				$this->delete();
344
				$this->delete();
345
			} else if (count($this->ressources) == 0) {// Altnative à l'utilisation de PUT
345
			} else if (count($this->ressources) == 0) {// Alternative à l'utilisation de PUT
346
				$this->add();
346
				$this->put();
347
			} else {
347
			} else {
348
				if ($this->service != null) {
348
				if ($this->service != null) {
349
					$Service = new $this->service(self::$config);
349
					$Service = new $this->service(self::$config);