From 05a047abe569771f219ebd12f905297947593f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillaume=20Perr=C3=A9al?= <guillaume.perreal@irstea.fr> Date: Wed, 28 Jan 2015 15:09:41 +0100 Subject: [PATCH] =?UTF-8?q?UploadedFile:=20ajout=20d'un=20=C3=A9tat=20"rej?= =?UTF-8?q?et=C3=A9".?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Entity/UploadedFile.php | 12 +++++++++++- Model/UploadedFileInterface.php | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Entity/UploadedFile.php b/Entity/UploadedFile.php index b0783524..c0ce6c17 100644 --- a/Entity/UploadedFile.php +++ b/Entity/UploadedFile.php @@ -241,7 +241,17 @@ class UploadedFile implements UploadedFileInterface */ public function setEtat($etat) { - if(!in_array($etat, [self::ETAT_CORROMPU, self::ETAT_EN_COURS, self::ETAT_MANQUANT, self::ETAT_NORMAL, self::ETAT_ORPHELIN])) { + if(!in_array( + $etat, + [ + self::ETAT_CORROMPU, + self::ETAT_EN_COURS, + self::ETAT_MANQUANT, + self::ETAT_NORMAL, + self::ETAT_ORPHELIN, + self::ETAT_REJETE + ] + )) { throw new InvalidArgumentException(sprintf("Etat invalide: '%s'", (string)$etat)); } $this->etat = $etat; diff --git a/Model/UploadedFileInterface.php b/Model/UploadedFileInterface.php index bb55278a..56e34c63 100644 --- a/Model/UploadedFileInterface.php +++ b/Model/UploadedFileInterface.php @@ -20,6 +20,7 @@ interface UploadedFileInterface const ETAT_NORMAL = 'normal'; const ETAT_CORROMPU = 'corrompu'; const ETAT_MANQUANT = 'manquant'; + const ETAT_REJETE = 'rejete'; /** * Get id -- GitLab