Subversion Repositories eFlore/Projets.eflore-projets

Compare Revisions

Ignore whitespace Rev 235 → Rev 236

/trunk/services/modules/0.1/commun/Aide.php
31,7 → 31,7
$this->url_liste_projet = Config::get('url_service_base').'commun/aide/projets';
$this->projet = Config::get('nom_projet');
$this->traiterRessources($ressources);
return $this->formerReponseHTTP(json_encode($this->table_retour));
return $this->formerReponseHTTP($this->table_retour);
}
//-----------------------------------------traiter reponse http-------------------------------------------------------------
54,7 → 54,7
// Envoie de l'entête
RestServeur::envoyerEnteteStatutHttp($this->entete_http);
// Envoie du corps
echo $this->corps_http;
return $this->corps_http;
}
public function renvoyerErreur($e, $c) {
109,19 → 109,9
$url = Config::get('url_service_base').$projet.'/aide';
$intitule = 'PROJET '.strtoupper($projet);
$res = $this->consulterHref($url);
//$res = $this->rest_client->consulter($url);
//$entete = $this->rest_client->getReponseEntetes();
if ($res) {
$res_return = $res->$intitule;
}
/* if (isset($entete['wrapper_data']) && $res != '') {
$res = json_decode($res);
if (!is_object($res)) print_r($res);
else $res_return = $res->$intitule;
} else {
$e = 'Le service aide du projet '.$projet.' ne fonctionne pas et renvoie comme entête : '.$entete.' et comme résultat : '.$res;
$this->renvoyerErreur(RestServeur::HTTP_CODE_MAUVAISE_REQUETE, $e);
}*/
return $res_return;
}