Rev 89 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed
<?php
// declare(encoding='UTF-8');
/**
* DAO des Taxons pour le module Taxons.
*
* @package Taxon
* @category php 5.2
* @author Jean-Pascal MILCENT <jpm@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: TaxonDao.php 151 2010-09-06 16:03:09Z jpm $
*
*/
class TaxonDao extends Dao {
const SERVICE = 'FicheTaxon';
/**
* Retourne l'ensemble des information sur un taxon.
*
* @param integer le numéro du taxon.
* @return array un tableau contenant les informations sur la taxon.
*/
public function getTaxon($ref, $id) {
$url = $this->url_jrest.self::SERVICE."/Taxon/$ref/$id";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees[0];
}
// Nomanclature
public function getNomenclature($ref, $id) {
$url = $this->url_jrest.self::SERVICE."/Nomenclature/$ref/$id";
$json = $this->envoyerRequeteConsultation($url);
$resultats = json_decode($json, true);
return $resultats[0];
}
public function getParentsHybride($ref, $id) {
$url = $this->url_jrest.self::SERVICE."/ParentsHybride/$ref/$id";
$json = $this->envoyerRequeteConsultation($url);
$parents = json_decode($json, true);
return $parents[0];
}
//Synonymie
public function getTaxonAffichage($ref, $id) {
$url = $this->url_jrest.self::SERVICE."/TaxonAffichage/$ref/$id";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees[0];
}
public function getHomonyme($ref, $nom) {
$url = $this->url_jrest.self::SERVICE."/Homonyme/$ref/$nom";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
public function getNomsBasionymeCommun($ref, $basionyme) {
$url = $this->url_jrest.self::SERVICE."/Basionyme/$ref/$basionyme";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
//Classification
public function getClassification($type, $ref, $id) {
$url = $this->url_jrest.self::SERVICE."/Taxon$type/$ref/$id";
$json = $this->envoyerRequeteConsultation($url);
$donnees = json_decode($json, true);
return $donnees;
}
}
?>