Ejemplo n.º 1
0
 public static function getModelCommentairePut($idCom, $idArticle, $login, $texte)
 {
     $model = new self(array());
     $commentaire = CommentaireFabrique::getCommentaire($model->dataError, $idCom, $idArticle, $login, $texte);
     $model->commentaire = CommentaireGateway::putCommentaire($model->dataError, $commentaire);
     $model->title = "Le commentaire à été inséré";
     return $model;
 }
 public static function getModelCommentairePut($Auteur, $dateParution, $Contenu, $IdArticle)
 {
     $model = new ModelCommentaire();
     $commentaire = CommentaireFabrique::getCommentaire($model->error, $Auteur, $dateParution, $Contenu, $IdArticle);
     if (!empty($model->getError())) {
         $model->setData($commentaire);
         return $model;
     }
     $model->setData(CommentaireGateway::putCommentaire($model->error, $commentaire));
     return $model;
 }