diff --git a/project/src/model/mdl/MdlDifficulte.php b/project/src/model/mdl/MdlDifficulte.php new file mode 100644 index 0000000..ebe6546 --- /dev/null +++ b/project/src/model/mdl/MdlDifficulte.php @@ -0,0 +1,25 @@ +gw = new DifficulteGateway($this->con); + } + + public function getAll(): array{ + $listDifficulte = []; + foreach($this->gw->getAll() as $row){ + $listDifficulte[] = new Difficulte($row['id'], $row['libelle']); + } + return $listDifficulte; + } + + public function getFromId(int $id): Difficulte{ + $row = $this->gw->getFromId($id); + return new Difficulte($row['id'], $row['libelle']); + } +} \ No newline at end of file