public static function getModelCommentairePost($idCom, $idArticle, $login, $texte) { $model = new self(array()); $commentaire = CommentaireFabrique::getCommentaire($model->dataError, $idCom, $idArticle, $login, $texte); $model->commentaire = CommentaireGateway::postCommentaire($model->dataError, $commentaire); $model->title = "Le commentaire a été mis à jour"; return $model; }
function getModelCommentairePost($id, $texte, $dateMiseEnLigne, $nomAuteur) { $model = new ModelCommentaire(); $commentaire = CommentaireFactory::getCommentaire($model->error, $id, $texte, $dateMiseEnLigne, $nomAuteur); if (!empty($model->getError())) { return $model; } $model->setData(CommentaireGateway::postCommentaire($model->error, $commentaire)); }