con = new Connection($dsn, $login, $password); } public function insert(string $name, string $content ,bool $completed, string $idListe): Tache{ $gate=new TacheGateway($this->con); $t=new Tache(0, $name, $content, $completed); $gate->insert($t, $idListe); $id=$gate->getLastId(); $t->setId($id); return $t; } public function delete(int $id){ $gate=new TacheGateway($this->con); $gate->delete($id); } public function update(Tache $tache, string $name, string $content, bool $completed){ $gate=new TacheGateway($this->con); $tache->setName($name); $tache->setContent($content); $tache->setCompleted($completed); $gate->update($tache); } public function findById(int $id): Tache{ $gate=new TacheGateway($this->con); return $gate->findById($id); } } ?>