diff --git a/WEB/Model/Enigme.php b/WEB/Model/Enigme.php index 56189534..d14528ec 100644 --- a/WEB/Model/Enigme.php +++ b/WEB/Model/Enigme.php @@ -3,7 +3,6 @@ class Enigme { private string $idEnigme; - private string $admin; private string $enonce; private string $aide; private string $rappel; @@ -13,7 +12,6 @@ class Enigme /** * @param string $idEnigme - * @param string $admin * @param string $enonce * @param string $aide * @param string $rappel @@ -21,17 +19,31 @@ class Enigme * @param string $test * @param int $tempsDeResolution */ - public function __construct(string $idEnigme, string $admin, string $enonce, string $aide, string $rappel, string $solution, string $test, int $tempsDeResolution) + public function __construct(string $idEnigme, string $enonce, string $aide, string $rappel, string $solution, string $test, int $tempsDeResolution) { - $this->idEnigme = $idEnigme; - $this->admin = $admin; - $this->enonce = $enonce; - $this->aide = $aide; - $this->rappel = $rappel; - $this->solution = $solution; - $this->test = $test; - $this->tempsDeResolution = $tempsDeResolution; + $arguments=func_get_args(); + $index=func_num_args(); + if(method_exists($this,$function='__construct'.$index)); + call_user_func(array(array($this,$function),$arguments)); + } + + public function __constructMulti(string $idEnigme, string $enonce, string $solution, string $test, int $tempsDeResolution){ + $this->idEnigme=$idEnigme; + $this->enonce=$enonce; + $this->solution=$solution; + $this->test=$test; + $this->tempsDeResolution=$tempsDeResolution; } + + public function __constructSolo(string $idEnigme, string $enonce, string $aide, string $rappel, string $solution, string $test){ + $this->idEnigme=$idEnigme; + $this->enonce=$enonce; + $this->aide=$aide; + $this->rappel=$rappel; + $this->solution=$solution; + $this->test=$test; + } + /** * @return string */ @@ -48,22 +60,6 @@ class Enigme $this->idEnigme = $idEnigme; } - /** - * @return string - */ - public function getAdmin(): string - { - return $this->admin; - } - - /** - * @param string $admin - */ - public function setAdmin(string $admin): void - { - $this->admin = $admin; - } - /** * @return string */