Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 25 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 25 Rev 31
Line 7... Line 7...
7
 * @category	php 5.2
7
 * @category	php 5.2
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
8
 * @author		Jean-Pascal MILCENT <jpm@tela-botanica.org>
9
 * @copyright	2010 Tela-Botanica
9
 * @copyright	2010 Tela-Botanica
10
 * @license		http://www.cecill.info/licences/Licence_CeCILL_V2-fr.txt Licence CECILL
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
11
 * @license		http://www.gnu.org/licenses/gpl.html Licence GNU-GPL
12
 * @version		SVN: $Id: StructureDao.php 25 2010-04-02 15:48:16Z jpm $
12
 * @version		SVN: $Id: StructureDao.php 31 2010-04-07 15:06:53Z jpm $
13
 *
13
 *
14
 */
14
 */
15
class StructureDao extends ColModele {
15
class StructureDao extends ColModele {
16
	const SERVICE_STRUCTURE = 'CoelStructure';
16
	const SERVICE_STRUCTURE = 'CoelStructure';
17
	const SERVICE_STRUCTURE_A_PERSONNE = 'CoelStructureAPersonne';
17
	const SERVICE_STRUCTURE_A_PERSONNE = 'CoelStructureAPersonne';
Line 24... Line 24...
24
	 */
24
	 */
25
	public function getStructure($id) {
25
	public function getStructure($id) {
26
		$url = $this->url_jrest.self::SERVICE_STRUCTURE."/*/$id/*";
26
		$url = $this->url_jrest.self::SERVICE_STRUCTURE."/*/$id/*";
27
		$json = file_get_contents($url);
27
		$json = file_get_contents($url);
28
		$donnees = json_decode($json, true);
28
		$donnees = json_decode($json, true);
29
		return $donnees[1];
29
		return $donnees['structures'];
30
	}
30
	}
Line 31... Line 31...
31
	
31
	
32
	/**
32
	/**
33
	 * Retourne le nombre de structure par zone géographique.
33
	 * Retourne le nombre de structure par zone géographique.