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 @@ +