From dbfc6bcbd186a23a926919cd3ce6cbb026458f3f Mon Sep 17 00:00:00 2001 From: Kevin MONDEJAR Date: Wed, 23 Oct 2024 15:14:51 +0200 Subject: [PATCH] Supprimer 'models/characterModel.php' --- models/characterModel.php | 54 --------------------------------------- 1 file changed, 54 deletions(-) delete mode 100644 models/characterModel.php diff --git a/models/characterModel.php b/models/characterModel.php deleted file mode 100644 index a9769b0..0000000 --- a/models/characterModel.php +++ /dev/null @@ -1,54 +0,0 @@ - gateway = $gateway; - } - - public function createCharacter(int $id_character, string $name , string $img_path) : bool - { - $q = new CharacterEntity($id_character, $name, $img_path); - - return $this -> gateway -> create($q); - } - public function getCharacterById(int $id_character) : ?CharacterEntity - { - return $this -> gateway -> findById($id_character); - } - - public function getCharacterByName(string $name) : ?CharacterEntity - { - return $this -> gateway -> findByName($name); - } - - public function getAllCharacters() : array - { - return $this -> gateway -> findAll(); - } - - public function deleteCharacter(int $id_character) : bool - { - return $this -> gateway -> delete($id_character); - } - - public function updateCharacter(int $id_character, string $name, string $img_path) : bool - { - $q = $this -> gateway -> findById($id_character); - - if($q){ - $q -> setName($name); - $q -> setImgPath($img_path); - return $this -> gateway -> update($q); - } - return false; - } - -} \ No newline at end of file