Subversion Repositories Applications.referentiel

Rev

Rev 79 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
76 delphine 1
<?php
2
// declare(encoding='UTF-8');
3
/**
4
 * DAO des Taxons pour le module Taxons.
5
 *
6
 * @package	Taxon
7
 * @category	php 5.2
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	2010 Tela-Botanica
10
 * @license	http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
11
 * @license	http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version	SVN: $Id: TaxonDao.php 151 2010-09-06 16:03:09Z jpm $
13
 *
14
 */
15
class TaxonDao extends Dao {
16
	const SERVICE = 'FicheTaxon';
17
	/**
18
	 * Retourne l'ensemble des information sur un taxon.
19
	 *
20
	 * @param integer le numéro du taxon.
21
	 * @return array un tableau contenant les informations sur la taxon.
22
	 */
23
	public function getTaxon($ref, $id) {
24
		$url = $this->url_jrest.self::SERVICE."/Taxon/$ref/$id";
25
		$json = $this->envoyerRequeteConsultation($url);
26
		$donnees = json_decode($json, true);
27
		return $donnees['taxons'];
28
	}
29
 
30
	public function getNomenclature($ref, $id) {
31
		$url = $this->url_jrest.self::SERVICE."/Nomenclature/$ref/$id";
32
		$json = $this->envoyerRequeteConsultation($url);
33
		$resultats = json_decode($json, true);
34
		return $resultats[0];
35
	}
36
	public function getParentsHybride($ref, $id) {
37
		$url = $this->url_jrest.self::SERVICE."/ParentsHybride/$ref/$id";
38
		$json = $this->envoyerRequeteConsultation($url);
39
		$parents = json_decode($json, true);
40
		return $parents[0];
41
	}
42
 
43
}
44
?>