From 5cb6ed3121f80f22e17c29ce9643f5604e0fe270 Mon Sep 17 00:00:00 2001 From: Johan LACHENAL Date: Mon, 21 Nov 2022 18:01:59 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20de=20la=20classe=20m=C3=A9tier=20e?= =?UTF-8?q?nigme=20et=20une=20gw?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WEB/Controller/EnigmeGateway.php | 7 ++++--- WEB/Model/Partie.php | 18 +++++++++--------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/WEB/Controller/EnigmeGateway.php b/WEB/Controller/EnigmeGateway.php index ae579337..2f2eb05d 100644 --- a/WEB/Controller/EnigmeGateway.php +++ b/WEB/Controller/EnigmeGateway.php @@ -52,10 +52,11 @@ class EnigmeGateway )); $results=$this->con->getResults(); $tabEnigme=array(); - /*foreach ($results as row) + foreach ($results as $row) { - $tabEnigme[]= new Enigme(row['id'],row['']); - }*/ + $tabEnigme[]= new Enigme(row['id'],row['admin'],row['enonce'],row['aide'],row['rappel'],row['solution'],row['test'],row['tempsDeResolution']); + } + return $tabEnigme; } public function showAll(): void diff --git a/WEB/Model/Partie.php b/WEB/Model/Partie.php index 11375902..705b2b5b 100644 --- a/WEB/Model/Partie.php +++ b/WEB/Model/Partie.php @@ -1,18 +1,20 @@ idPartie = $idPartie; - $this->datePartie = getdate(NULL); + $this->datePartie = getdate(); } /** @@ -32,20 +34,18 @@ class Partie } /** - * @return date + * @return array */ - public function getDatePartie(): date + public function getDatePartie(): array { return $this->datePartie; } /** - * @param date $datePartie + * @param array $datePartie */ - public function setDatePartie(date $datePartie): void + public function setDatePartie(array $datePartie): void { $this->datePartie = $datePartie; } - - } \ No newline at end of file