From 681d5ded9e62145370b98971f04b1cf3ee5723f4 Mon Sep 17 00:00:00 2001 From: Kevin MONDEJAR Date: Wed, 23 Oct 2024 15:15:00 +0200 Subject: [PATCH] Supprimer 'models/commentaryModel.php' --- models/commentaryModel.php | 42 -------------------------------------- 1 file changed, 42 deletions(-) delete mode 100644 models/commentaryModel.php diff --git a/models/commentaryModel.php b/models/commentaryModel.php deleted file mode 100644 index c104f9b..0000000 --- a/models/commentaryModel.php +++ /dev/null @@ -1,42 +0,0 @@ -gw = $gw; - } - - public function createComment(int $id_comment, string $comment, string $date): bool { - - $c = new CommentaryEntity($id_comment, $comment, $date); - return $this->gw->create($c); - } - - public function getComment(int $id_comment): ?commentaryEntity { - return $this -> gw -> findById($id_comment); - } - - public function getComments(): array { - return $this -> gw -> findAll(); - } - - public function deleteComment(int $id_comment): bool { - return $this -> gw -> delete($id_comment); - } - - public function updateComment(int $id_comment, string $comment): bool { - - $c = $this -> gw -> findById($id_comment); - - if($c){ - $c -> setComment($comment); - return $this->gw -> update($c); - } - return false; - } - -} \ No newline at end of file