18,12 → 18,8 |
class ValiderDetermination { |
|
private $conteneur; |
private $navigation; |
private $masque; |
private $gestionBdd; |
private $bdd; |
private $parametres = array(); |
private $ressources = array(); |
private $idObs = null; |
private $idProposition = null; |
private $idAuteurObs = null; |
38,13 → 34,14 |
public function modifier($ressources, $parametres) { |
$this->verifierParametres($ressources, $parametres); |
$this->idProposition = $ressources[1]; |
$e = $this->modifierObservationParDetermination(); |
$retourCel = $this->modifierObservationParDetermination(); |
|
if ($e == 'ok' || $e == 'OK' || $e == 'Not Modified') { |
RestServeur::envoyerEnteteStatutHttp(RestServeur::HTTP_CODE_OK); |
} else { |
throw new Exception("Erreur: le web service du CEL a retourné : $e", RestServeur::HTTP_CODE_ERREUR); |
if (preg_match('/^(OK|Not Modified)$/i', $retourCel) == false) { |
$msg = "Erreur: le web service du CEL a retourné : $e"; |
$code = RestServeur::HTTP_CODE_ERREUR; |
throw new Exception($msg, $code); |
} |
return 'OK'; |
} |
|
private function verifierParametres($ressources, $parametres) { |