Subversion Repositories eFlore/Applications.coel-consultation

Compare Revisions

Regard whitespace Rev 18 → Rev 19

/trunk/modeles/StructureDao.php
13,6 → 13,8
*
*/
class StructureDao extends ColModele {
const SERVICE_STRUCTURE = 'CoelStructure';
const SERVICE_STRUCTURE_A_PERSONNE = 'CoelStructureAPersonne';
 
/**
* Retourne l'ensemble des information sur une structure.
21,7 → 23,8
* @return array un tableau contenant les informations sur la structure.
*/
public function getStructure($id) {
$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelStructure/*/$id/*");
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/*/$id/*";
$json = file_get_contents($url);
$donnees = json_decode($json, true);
return $donnees[1];
}
33,7 → 36,8
* @return array un tableau contenant les informations sur le personnel de la structure.
*/
public function getPersonnel($id) {
$json = file_get_contents("http://www.tela-botanica.org/eflore/coel/jrest/CoelStructureAPersonne/$id");
$url = $this->url_jrest.self::SERVICE_STRUCTURE_A_PERSONNE."/$id";
$json = file_get_contents($url);
$donnees = json_decode($json, true);
$this->nettoyerTableauDeTableauxAssoc($donnees);
return $donnees;