Subversion Repositories Applications.referentiel

Rev

Rev 76 | Rev 85 | Go to most recent revision | Details | Compare with Previous | 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);
79 delphine 27
		return $donnees[0];
76 delphine 28
	}
29
 
79 delphine 30
	// Nomanclature
76 delphine 31
	public function getNomenclature($ref, $id) {
32
		$url = $this->url_jrest.self::SERVICE."/Nomenclature/$ref/$id";
33
		$json = $this->envoyerRequeteConsultation($url);
34
		$resultats = json_decode($json, true);
35
		return $resultats[0];
36
	}
79 delphine 37
 
76 delphine 38
	public function getParentsHybride($ref, $id) {
39
		$url = $this->url_jrest.self::SERVICE."/ParentsHybride/$ref/$id";
40
		$json = $this->envoyerRequeteConsultation($url);
41
		$parents = json_decode($json, true);
42
		return $parents[0];
43
	}
44
 
79 delphine 45
	//Synonymie
46
	public function getTaxonAffichage($ref, $id) {
47
		$url = $this->url_jrest.self::SERVICE."/TaxonAffichage/$ref/$id";
48
		$json = $this->envoyerRequeteConsultation($url);
49
		$donnees = json_decode($json, true);
50
		return $donnees[0];
51
	}
52
 
76 delphine 53
}
54
?>