Line 3... |
Line 3... |
3 |
* @copyright 2013 Tela Botanica (accueil@tela-botanica.org)
|
3 |
* @copyright 2013 Tela Botanica (accueil@tela-botanica.org)
|
4 |
* @author Raphaël Droz <raphael@tela-botanica.org>
|
4 |
* @author Raphaël Droz <raphael@tela-botanica.org>
|
5 |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
|
5 |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
|
6 |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
|
6 |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
|
7 |
*
|
7 |
*
|
8 |
* pattern: /service:eflore:0.1/coste/textes2/bdtfx.nn:182
|
8 |
* pattern: /service:eflore:0.1/coste/textes/bdtfx.nn:182
|
9 |
* params: txt.format=(htm|txt) , retour.champs=(titre,texte,...) , retour.format=(min|max), ...
|
9 |
* params: txt.format=(htm|txt) , retour.champs=(titre,texte,...) , retour.format=(min|max), ...
|
10 |
*
|
10 |
*
|
11 |
* Ce webservice est censé pouvoir:
|
11 |
* Ce webservice est censé pouvoir:
|
12 |
* 1) retourner des informations (choisies) à propos d'un taxon donné (à partir de son numéro nomenclatural
|
12 |
* 1) retourner des informations (choisies) à propos d'un taxon donné (à partir de son numéro nomenclatural
|
13 |
* 2) retourner des informations (choisies) à propos de taxons recherchés (à partir de divers critères)
|
13 |
* 2) retourner des informations (choisies) à propos de taxons recherchés (à partir de divers critères)
|
Line 16... |
Line 16... |
16 |
*
|
16 |
*
|
17 |
*/
|
17 |
*/
|
Line 18... |
Line 18... |
18 |
|
18 |
|
19 |
/*restore_error_handler();
|
19 |
/*restore_error_handler();
|
20 |
error_reporting(E_ALL);*/
|
20 |
error_reporting(E_ALL);*/
|
21 |
class Textes2 {
|
21 |
class Textes {
|
22 |
// paramètres autorisés
|
22 |
// paramètres autorisés
|
23 |
static $allow_params = array(
|
23 |
static $allow_params = array(
|
24 |
'txt.format', 'retour.format', 'retour.champs',
|
24 |
'txt.format', 'retour.format', 'retour.champs',
|
25 |
'recherche',
|
25 |
'recherche',
|
Line 316... |
Line 316... |
316 |
// request handler
|
316 |
// request handler
|
317 |
static function requestParse(&$ressource, &$params) {
|
317 |
static function requestParse(&$ressource, &$params) {
|
318 |
$uri = explode('/', $_SERVER['REDIRECT_URL']);
|
318 |
$uri = explode('/', $_SERVER['REDIRECT_URL']);
|
319 |
if(!empty($_SERVER['QUERY_STRING']))
|
319 |
if(!empty($_SERVER['QUERY_STRING']))
|
320 |
parse_str($_SERVER['REDIRECT_QUERY_STRING'], $params);
|
320 |
parse_str($_SERVER['REDIRECT_QUERY_STRING'], $params);
|
321 |
$ressource = array_slice($uri, array_search('textes2', $uri) + 1, 3);
|
321 |
$ressource = array_slice($uri, array_search('textes', $uri) + 1, 3);
|
322 |
}
|
322 |
}
|
Line 323... |
Line 323... |
323 |
|
323 |
|
324 |
// supprime l'index du tableau des paramètres si sa valeur ne correspond pas
|
324 |
// supprime l'index du tableau des paramètres si sa valeur ne correspond pas
|
325 |
// au spectre passé par $values.
|
325 |
// au spectre passé par $values.
|