New file |
0,0 → 1,37 |
<?php |
// declare(encoding='UTF-8'); |
/** |
* Service recherche du nombre a partir de divers critères |
* |
* 2: Le service recherche le nombre d'observations correspondant aux critères demandés |
* 3: Le service renvoie le nombre calcule |
* |
* @internal Mininum PHP version : 5.2 |
* @category CEL |
* @package Services |
* @subpackage Observations |
* @version 0.1 |
* @author Mathias CHOUET <mathias@tela-botanica.org> |
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org> |
* @author Aurelien PERONNET <aurelien@tela-botanica.org> |
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt> |
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt> |
* @copyright 1999-2014 Tela Botanica <accueil@tela-botanica.org> |
*/ |
class InventoryObservationCount extends Cel { |
|
/** |
* Renvoie le nombre d' observations correspondant aux critères |
* uid[0] : utilisateur obligatoire |
* uid[1] : criteres de filtrage de la forme critere1=valeur1&critere2=valeur2 |
*/ |
public function getElement($uid) { |
// Controle detournement utilisateur |
$this->controleUtilisateur($uid[0]); |
|
$chercheurObs = new RechercheObservation($this->config); |
$retour = $chercheurObs->compterObservations($uid[0], $_GET); |
$this->envoyerJson($retour); |
return true; |
} |
} |