| 416 |
aurelien |
1 |
<?php
|
| 2458 |
jpm |
2 |
// declare(encoding='UTF-8');
|
| 416 |
aurelien |
3 |
/**
|
| 2458 |
jpm |
4 |
* Service recherche du nombre a partir de divers critères
|
|
|
5 |
*
|
|
|
6 |
* 2: Le service recherche le nombre d'observations correspondant aux critères demandés
|
|
|
7 |
* 3: Le service renvoie le nombre calcule
|
|
|
8 |
*
|
|
|
9 |
* @internal Mininum PHP version : 5.2
|
|
|
10 |
* @category CEL
|
|
|
11 |
* @package Services
|
|
|
12 |
* @subpackage Observations
|
|
|
13 |
* @version 0.1
|
|
|
14 |
* @author Mathias CHOUET <mathias@tela-botanica.org>
|
|
|
15 |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
|
|
|
16 |
* @author Aurelien PERONNET <aurelien@tela-botanica.org>
|
|
|
17 |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
|
|
|
18 |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
|
|
|
19 |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org>
|
|
|
20 |
*/
|
| 859 |
aurelien |
21 |
class InventoryObservationCount extends Cel {
|
| 416 |
aurelien |
22 |
|
| 859 |
aurelien |
23 |
/**
|
| 2458 |
jpm |
24 |
* Renvoie le nombre d' observations correspondant aux critères
|
|
|
25 |
* uid[0] : utilisateur obligatoire
|
|
|
26 |
* uid[1] : criteres de filtrage de la forme critere1=valeur1&critere2=valeur2
|
| 859 |
aurelien |
27 |
*/
|
| 2458 |
jpm |
28 |
public function getElement($uid) {
|
| 416 |
aurelien |
29 |
// Controle detournement utilisateur
|
|
|
30 |
$this->controleUtilisateur($uid[0]);
|
|
|
31 |
|
| 2458 |
jpm |
32 |
$chercheurObs = new RechercheObservation($this->config);
|
|
|
33 |
$retour = $chercheurObs->compterObservations($uid[0], $_GET);
|
| 1014 |
aurelien |
34 |
$this->envoyerJson($retour);
|
|
|
35 |
return true;
|
| 416 |
aurelien |
36 |
}
|
| 2458 |
jpm |
37 |
}
|