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 71 2010-05-21 12:47:34Z jpm $
|
12 |
* @version SVN: $Id: StructureDao.php 118 2010-06-28 10:40:13Z jpm $
|
13 |
*
|
13 |
*
|
14 |
*/
|
14 |
*/
|
15 |
class StructureDao extends ColModele {
|
15 |
class StructureDao extends ColModele {
|
16 |
const ROLE_EQUIPE = 2027;
|
16 |
const ROLE_EQUIPE = 2027;
|
17 |
const SERVICE_STRUCTURE = 'CoelStructure';
|
17 |
const SERVICE_STRUCTURE = 'CoelStructure';
|
Line 21... |
Line 21... |
21 |
* Retourne l'ensemble des information sur une structure.
|
21 |
* Retourne l'ensemble des information sur une structure.
|
22 |
*
|
22 |
*
|
23 |
* @param integer l'id de la structure.
|
23 |
* @param integer l'id de la structure.
|
24 |
* @return array un tableau contenant les informations sur la structure.
|
24 |
* @return array un tableau contenant les informations sur la structure.
|
25 |
*/
|
25 |
*/
|
26 |
public function getStructure($id) {
|
26 |
public function getStructure($id_structure) {
|
27 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/*/$id/*";
|
27 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/*/$id_structure/*";
|
28 |
$json = file_get_contents($url);
|
28 |
$json = file_get_contents($url);
|
29 |
$donnees = json_decode($json, true);
|
29 |
$donnees = json_decode($json, true);
|
30 |
return $donnees['structures'];
|
30 |
return $donnees['structures'];
|
31 |
}
|
31 |
}
|
Line 47... |
Line 47... |
47 |
* Retourne l'ensemble des informations du personnel d'une structure.
|
47 |
* Retourne l'ensemble des informations du personnel d'une structure.
|
48 |
*
|
48 |
*
|
49 |
* @param integer l'id de la structure.
|
49 |
* @param integer l'id de la structure.
|
50 |
* @return array un tableau contenant les informations sur le personnel de la structure.
|
50 |
* @return array un tableau contenant les informations sur le personnel de la structure.
|
51 |
*/
|
51 |
*/
|
52 |
public function getPersonnel($id) {
|
52 |
public function getPersonnel($id_structure) {
|
53 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE_A_PERSONNE."/$id";
|
53 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE_A_PERSONNE."/$id_structure";
|
54 |
$json = file_get_contents($url);
|
54 |
$json = file_get_contents($url);
|
55 |
$donnees = json_decode($json, true);
|
55 |
$donnees = json_decode($json, true);
|
56 |
$personnes = $donnees['structuresAPersonne'];
|
56 |
$personnes = $donnees['structuresAPersonne'];
|
Line 57... |
Line 57... |
57 |
|
57 |
|