Subversion Repositories eFlore/Applications.coel-consultation

Rev

Rev 22 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 22 Rev 34
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: CollectionDao.php 22 2010-03-30 10:50:03Z jpm $
12
 * @version		SVN: $Id: CollectionDao.php 34 2010-04-23 13:58:21Z jpm $
13
 *
13
 *
14
 */
14
 */
15
class CollectionDao extends ColModele {
15
class CollectionDao extends ColModele {
16
	const SERVICE_COLLECTION = 'CoelCollection';
16
	const SERVICE_COLLECTION = 'CoelCollection';
17
	const SERVICE_COLLECTION_A_PERSONNE = 'CoelCollectionAPersonne';
17
	const SERVICE_COLLECTION_A_PERSONNE = 'CoelCollectionAPersonne';
Line 25... Line 25...
25
	 * @return array un tableau contenant les informations sur la collection.
25
	 * @return array un tableau contenant les informations sur la collection.
26
	 */
26
	 */
27
	public function getCollection($id) {
27
	public function getCollection($id) {
28
		$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelCollection/*/$id/*");
28
		$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelCollection/*/$id/*");
29
		$donnees = json_decode($json, true);
29
		$donnees = json_decode($json, true);
30
		return $donnees[1];
30
		return $donnees['collections'];
31
	}
31
	}
Line 32... Line 32...
32
	
32
	
33
	/**
33
	/**
34
	 * Retourne les collection correspondant à un id strucutre précis.
34
	 * Retourne les collection correspondant à un id strucutre précis.