Rev 163 | Blame | Last modification | View Log | RSS feed
<?php
/**
* Description :
* Classe principale de chargement des services d'eFlore.
*
* Encodage en entrée : utf8
* Encodage en sortie : utf8
* @package eflore-projets
* @author Jennifer DHÉ <jennifer.dhe@tela-botanica.org>
* @author Delphine CAUQUIL <delphine@tela-botanica.org>
* @author Jean-Pascal MILCENT <jpm@tela-botanica.org>
* @license GPL v3 <http://www.gnu.org/licenses/gpl.txt>
* @license CECILL v2 <http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt>
* @version 0.1
* @copyright 1999-2011 Tela Botanica (accueil@tela-botanica.org)
*/
class Projets extends RestService {
private $conteneur = null;
public function __construct() {
$this->utilisationParametresBruts = true;
}
public function consulter($ressources, $parametres) {
$resultat = '';
$reponseHttp = new ReponseHttp();
try {
$this->initialiserConteneur($ressources, $parametres);
$projet = $this->conteneur->getProjet();
$projet->verifier();
$resultat = $projet->consulter();
$reponseHttp->setResultatService($resultat);
} catch (Exception $e) {
$reponseHttp->ajouterErreur($e);
}
$reponseHttp->emettreLesEntetes();
$corps = $reponseHttp->getCorps();
return $corps;
}
private function initialiserConteneur($ressources, $parametres) {
$this->conteneur = new Conteneur();
$this->conteneur->setParametre('ressources', $ressources);
$this->conteneur->setParametre('parametres', $parametres);
$this->conteneur->setParametre('cheminBase', dirname(__FILE__).DS);
}
}
?>