Subversion Repositories eFlore/Applications.del

Rev

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

Rev 1793 Rev 1795
Line 1... Line 1...
1
<?php
1
<?php
-
 
2
// declare(encoding='UTF-8');
2
/**
3
/**
3
 * Classe principale de chargement des services concernant les déterminations dans DEL.
4
 * Classe principale de chargement des sous-services concernant les "déterminations" dans DEL.
4
 *
5
 *
5
 * Encodage en entrée : utf8
6
 * URLs possibles :
6
 * Encodage en sortie : utf8
7
 * GET :
-
 
8
 * http://localhost/del/services/0.1/determinations/images-determinations-probables =>
7
 *
9
 *
-
 
10
 * POST :
-
 
11
 * http://localhost/del/services/0.1/determinations/valider-determination/#idProposition => Permet d'accepter une proposition donnée
-
 
12
 *
8
 * @category DEL
13
 * @category   DEL
9
 * @package Services
14
 * @package    Services
10
 * @subpackage Determinations
15
 * @subpackage Determinations
11
 * @version 0.1
16
 * @version    0.1
12
 * @author Jennifer DHÉ <jennifer.dhe@tela-botanica.org>
17
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
13
 * @author Delphine CAUQUIL <delphine@tela-botanica.org>
18
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
14
 * @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
19
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
15
 * @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
20
 * @license    GPL v3 <http://www.gnu.org/licenses/gpl.txt>
16
 * @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
21
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
17
 * @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>
22
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
18
 */
23
 */
19
class Determinations extends RestService {
24
class Determinations extends RestService {
Line 20... Line 25...
20
 
25
 
21
	private $parametres = array();
26
	private $parametres = array();
Line 50... Line 55...
50
		$this->ressources = $ressources;
55
		$this->ressources = $ressources;
51
		$this->parametres = $parametres;
56
		$this->parametres = $parametres;
52
	}
57
	}
Line 53... Line 58...
53
 
58
 
54
	private function executerService() {
-
 
55
		$resultat = '';
59
	private function executerService() {
56
		$reponseHttp = new ReponseHttp();
60
		$reponseHttp = new ReponseHttp();
57
		try {
61
		try {
58
			$this->conteneur = new Conteneur($this->parametres);
62
			$this->conteneur = new Conteneur($this->parametres);
59
			$resultat = $this->traiterRessources();
63
			$resultat = $this->traiterRessources();
Line 76... Line 80...
76
	private function chargerConfigService() {
80
	private function chargerConfigService() {
77
		$chemin = Config::get('chemin_configurations')."config_{$this->serviceNom}.ini";
81
		$chemin = Config::get('chemin_configurations')."config_{$this->serviceNom}.ini";
78
		Config::charger($chemin);
82
		Config::charger($chemin);
79
	}
83
	}
Line 80... Line -...
80
 
-
 
81
	/**
-
 
82
	 * URLs possibles :
-
 
83
	 *
-
 
84
	 * GET :
-
 
85
	 * http://localhost/del/services/0.1/determinations/images-determinations-probables =>
-
 
86
	 *
-
 
87
	 *
-
 
88
	 * PUT :
-
 
89
	 *
-
 
90
	 *
-
 
91
	 * POST :
-
 
92
	 * http://localhost/del/services/0.1/determinations/valider-determination/#idProposition => Permet d'accepter une proposition donnée
-
 
93
	 *
-
 
94
	 * DELETE :
-
 
95
	 *
-
 
96
	 */
84
 
97
	private function analyserRessources() {
85
	private function analyserRessources() {
98
		if ($this->methode == 'consulter') {
86
		if ($this->methode == 'consulter') {
99
			if ($this->ressources[0] == 'images-determinations-probables') {
87
			if ($this->ressources[0] == 'images-determinations-probables') {
100
				$this->sousServiceNom = 'liste-images-determinations-probables';
88
				$this->sousServiceNom = 'liste-images-determinations-probables';