| 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 150 2010-09-06 15:24:03Z jpm $
|
12 |
* @version SVN: $Id: StructureDao.php 169 2011-03-11 09:15:42Z jpm $
|
| 13 |
*
|
13 |
*
|
| 14 |
*/
|
14 |
*/
|
| 15 |
class StructureDao extends Dao {
|
15 |
class StructureDao extends Dao {
|
| 16 |
const ROLE_EQUIPE = 2027;
|
16 |
const ROLE_EQUIPE = 2027;
|
| 17 |
const SERVICE_STRUCTURE = 'CoelStructure';
|
17 |
const SERVICE_STRUCTURE = 'CoelStructure';
|
| Line 36... |
Line 36... |
| 36 |
* @param integer le type de recherche à effectuée.
|
36 |
* @param integer le type de recherche à effectuée.
|
| 37 |
* @return array un tableau contenant les informations sur le nombre de structures par zone.
|
37 |
* @return array un tableau contenant les informations sur le nombre de structures par zone.
|
| 38 |
*/
|
38 |
*/
|
| 39 |
public function getStructureParZoneGeo($type_recherche) {
|
39 |
public function getStructureParZoneGeo($type_recherche) {
|
| 40 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/ParZoneGeo/$type_recherche";
|
40 |
$url = $this->url_jrest.self::SERVICE_STRUCTURE."/ParZoneGeo/$type_recherche";
|
| - |
|
41 |
$url = $this->limiterParProjets($url);
|
| 41 |
$json = $this->envoyerRequeteConsultation($url);
|
42 |
$json = $this->envoyerRequeteConsultation($url);
|
| 42 |
$donnees = json_decode($json, true);
|
43 |
$donnees = json_decode($json, true);
|
| 43 |
return $donnees;
|
44 |
return $donnees;
|
| 44 |
}
|
45 |
}
|
| Line -... |
Line 46... |
| - |
|
46 |
|
| - |
|
47 |
private function limiterParProjets($url) {
|
| - |
|
48 |
if (Config::get('projets') != '') {
|
| - |
|
49 |
$url .= '/'.Config::get('projets');
|
| - |
|
50 |
}
|
| - |
|
51 |
return $url;
|
| - |
|
52 |
}
|
| 45 |
|
53 |
|
| 46 |
/**
|
54 |
/**
|
| 47 |
* Retourne l'ensemble des informations du personnel d'une structure.
|
55 |
* Retourne l'ensemble des informations du personnel d'une structure.
|
| 48 |
*
|
56 |
*
|
| 49 |
* @param integer l'id de la structure.
|
57 |
* @param integer l'id de la structure.
|