Rev 2458 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php// declare(encoding='UTF-8');/*** Service de complétion du nom scientifique.** Cas d'utilisation :* 1 : L'application recoit un debut de nom scientifique ainsi qu'un code de référentiel* 2 : Si le genre recu est >1, l'application retourne les 50 premieres genre commencant par ce prefixe* 3 : Si l'espece est presente l'application retourne les 50 premieres genre+espece commencant par ce prefixe** @internal Mininum PHP version : 5.2* @category CEL* @package Services* @subpackage Auto-complétions* @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 NameSearch extends Cel {public function getRessource(){//TODO: description du service à renvoyerprint '[]';return;}public function getElement($uid){$referentiel = isset($uid[0]) ? $uid[0] : null;$genre = isset($uid[1]) ? $uid[1] : null;$espece = isset($uid[2]) ? $uid[2] : null;$chercheur_infos_taxon = new RechercheInfosTaxonBeta($this->config, $referentiel);$liste_genre_espece = $chercheur_infos_taxon->rechercherGenreEspeceSurPrefixe($genre,$espece);$this->envoyerJson($liste_genre_espece);return true;}}