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