Subversion Repositories eFlore/Applications.cel

Rev

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

Rev 1920 Rev 2463
Line 1... Line 1...
1
<?php
1
<?php
2
// In : utf8 url_encoded (get et post)
2
// declare(encoding='UTF-8');
3
// Out : utf8
3
/**
-
 
4
 * Classe principale de gestion des web-services.
4
 
5
 *
-
 
6
 * @internal   Mininum PHP version : 5.2
-
 
7
 * @category   CEL
-
 
8
 * @package    Services
-
 
9
 * @subpackage Index
-
 
10
 * @version    0.1
-
 
11
 * @author     Mathias CHOUET <mathias@tela-botanica.org>
-
 
12
 * @author     Jean-Pascal MILCENT <jpm@tela-botanica.org>
-
 
13
 * @author     Aurelien PERONNET <aurelien@tela-botanica.org>
-
 
14
 * @license    GPL v3 <http://www.gnu.org/licenses/gpl.txt>
-
 
15
 * @license    CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
5
// TODO : gerer les retours : dans ce controleur : code retour et envoi ...
16
 * @copyright  1999-2014 Tela Botanica <accueil@tela-botanica.org>
-
 
17
 */
6
class JRest {
18
class JRest {
Line 7... Line 19...
7
 
19
 
8
 	/** Parsed configuration file */
20
 	/** Parsed configuration file */
Line 42... Line 54...
42
			if (strlen($_SERVER['QUERY_STRING']) == 0) {
54
			if (strlen($_SERVER['QUERY_STRING']) == 0) {
43
				$len = strlen($_SERVER['REQUEST_URI']);
55
				$len = strlen($_SERVER['REQUEST_URI']);
44
			} else {
56
			} else {
45
				$len = -(strlen($_SERVER['QUERY_STRING']) + 1);
57
				$len = -(strlen($_SERVER['QUERY_STRING']) + 1);
46
			}
58
			}
47
			
59
 
48
			$urlString = '';
60
			$urlString = '';
49
			if  (substr_count($_SERVER['REQUEST_URI'], $this->config['settings']['baseURL']) > 0) {
61
			if  (substr_count($_SERVER['REQUEST_URI'], $this->config['settings']['baseURL']) > 0) {
50
				$urlString = substr($_SERVER['REQUEST_URI'], strlen($this->config['settings']['baseURL']), $len);
62
				$urlString = substr($_SERVER['REQUEST_URI'], strlen($this->config['settings']['baseURL']), $len);
51
			} else if (substr_count($_SERVER['REQUEST_URI'], $this->config['settings']['baseAlternativeURL']) > 0) {
63
			} else if (substr_count($_SERVER['REQUEST_URI'], $this->config['settings']['baseAlternativeURL']) > 0) {
52
				$urlString = substr($_SERVER['REQUEST_URI'], strlen($this->config['settings']['baseAlternativeURL']), $len);
64
				$urlString = substr($_SERVER['REQUEST_URI'], strlen($this->config['settings']['baseAlternativeURL']), $len);