From abd5c8c3802bd2984d4a2c5161929a808bf89829 Mon Sep 17 00:00:00 2001 From: Kevin MONDEJAR Date: Wed, 23 Oct 2024 15:15:17 +0200 Subject: [PATCH] Supprimer 'models/sourceModel.php' --- models/sourceModel.php | 61 ------------------------------------------ 1 file changed, 61 deletions(-) delete mode 100644 models/sourceModel.php diff --git a/models/sourceModel.php b/models/sourceModel.php deleted file mode 100644 index 4a4a7e2..0000000 --- a/models/sourceModel.php +++ /dev/null @@ -1,61 +0,0 @@ - gateway = $gateway; - } - - public function createSource(int $id_source, string $title, string $date) : bool - { - $q = new SourceEntity($id_source , $title, $date); - - return $this -> gateway -> create($q); - } - - public function getSourceById(int $id_source) : ?SourceEntity - { - return $this -> gateway -> findById($id_source); - } - - public function getSourceByTitle(string $title) : ?SourceEntity - { - return $this -> gateway -> findByTitle($title); - } - - public function getSourceByDate(string $date) : ?SourceEntity - { - return $this -> gateway -> findByDate($date); - } - - public function getSources() : array - { - return $this -> gateway -> findAll(); - } - - public function deleteSource(int $id_source) : bool - { - return $this -> gateway -> delete($id_source); - } - - public function updateSource(int $id_source, string $title, string $date) : bool - { - $q = $this -> gateway -> findById($id_source); - - if ($q){ - $q -> setTitle($title); - $q -> setDate($date); - return $this -> gateway -> update($q); - } - return false; - } - -} -