Rev 10 | Rev 20 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php// declare(encoding='UTF-8');/*** Modèle d'accès à la base de données des Collections pour la Recherche** @package Collection* @category php5* @author aurelien <aurelien@tela-botanica.org>* @copyright 2010 Tela-Botanica* @license http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL* @license http://www.gnu.org/licenses/gpl.html Licence GNU-GPL* @version SVN: $Id: RechercheDao.php 19 2010-03-24 18:22:25Z jpm $**/class RechercheDao extends ColModele {const SERVICE = 'CoelRecherche';/*** Recherche une collection en fonction de paramêtres* @return array un tableau contenant des objets d'informations sur les collections*/public function chercherStructureNbre($parametres) {$mots = urlencode($parametres['mots']);$url = $this->url_jrest.self::SERVICE."/Nombre/$mots";$json = file_get_contents($url);$donnees = json_decode($json);return $donnees;}/*** Recherche une collection en fonction de paramêtres* @return array un tableau contenant des objets d'informations sur les collections*/public function chercher($parametres) {$mots = urlencode($parametres['mots']);$url = $this->url_jrest.self::SERVICE."/ParDefaut/$mots";$url .= ($this->avoirLimitation() ? "?start={$this->getLimiteDebut()}&limit={$this->getLimiteNbre()}" : '');$json = file_get_contents($url);$donnees = json_decode($json, true);return $donnees;}}?>