From 96417d5c8b831778f0ea2e8475a6a631281e7e04 Mon Sep 17 00:00:00 2001 From: johan Date: Mon, 5 Dec 2022 15:48:34 +0100 Subject: [PATCH] Ajout de la factory Utilisateur --- WEB/Controller/EnigmeGateway.php | 10 +++++++--- WEB/Factory/UtilisateurFactory.php | 14 ++++++++++++++ WEB/Model/scripted.db | Bin 53248 -> 53248 bytes 3 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 WEB/Factory/UtilisateurFactory.php diff --git a/WEB/Controller/EnigmeGateway.php b/WEB/Controller/EnigmeGateway.php index 8379835d..9ecba86b 100644 --- a/WEB/Controller/EnigmeGateway.php +++ b/WEB/Controller/EnigmeGateway.php @@ -56,12 +56,16 @@ class EnigmeGateway $query = "SELECT * FROM Enigme WHERE points IS NOT NULL OR points != 0"; $this->con->executeQuery($query); - $results = $this->con->getResults(); - return $results; + $tabEnigme=EnigmeFactory::create($this->con->getResults()); + return $tabEnigme } public function findSoloEnigma(){ - + $query = "SELECT * FROM Enigme + WHERE points IS NULL OR points = 0"; + $this->con->executeQuery($query); + $tabEnigme=EnigmeFactory::create($this->con->getResults()); + return $tabEnigme } public function findById(string $idEnigme) : array diff --git a/WEB/Factory/UtilisateurFactory.php b/WEB/Factory/UtilisateurFactory.php new file mode 100644 index 00000000..03c8b27f --- /dev/null +++ b/WEB/Factory/UtilisateurFactory.php @@ -0,0 +1,14 @@ +f*hCp;MzM_vOZfR%`NA0Zm+=SlGx4qC3)?Ix;KCOX#>%EC*~rR~ zm7kqhllKxK4wE_GvJE@pCWZ)ah0ZfRw5F(fj1Brz}~M_OxPHnXlCRsjqI f54ivj><`)x$`84-5ip|<1`p!^8%}Stxi3ec4ap|g