Subversion Repositories Applications.referentiel

Rev

Rev 104 | 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
	}
85 delphine 52
 
89 delphine 53
	public function getHomonyme($ref, $nom) {
54
		$url = $this->url_jrest.self::SERVICE."/Homonyme/$ref/$nom";
55
		$json = $this->envoyerRequeteConsultation($url);
56
		$donnees = json_decode($json, true);
57
		return $donnees;
58
	}
59
 
104 delphine 60
	public function getNomsBasionymeCommun($ref, $basionyme) {
61
		$url = $this->url_jrest.self::SERVICE."/Basionyme/$ref/$basionyme";
62
		$json = $this->envoyerRequeteConsultation($url);
63
		$donnees = json_decode($json, true);
64
		return $donnees;
65
	}
66
 
85 delphine 67
	//Classification
68
	public function getClassification($type, $ref, $id) {
69
		$url = $this->url_jrest.self::SERVICE."/Taxon$type/$ref/$id";
70
		$json = $this->envoyerRequeteConsultation($url);
71
		$donnees = json_decode($json, true);
72
		return $donnees;
73
	}
79 delphine 74
 
76 delphine 75
}
76
?>