select($id); //On parse les données récupérées $this->id = $id; $this->group_id = $data["group_id"]; $this->question = $data["question"]; $this->bonne_reponse = $data["bonnereponse"]; } else { //On crée un nouvel objet $this->id = $id; $this->group_id = $group_id; $this->question_text = $question; $this->bonne_reponse = $reponse; } } public function getId() { return $this->id; } public function getGroupId() { return $this->group_id; } public function getQuestion() { return $this->question_text; } public function getReponse() { return $this->bonne_reponse; } } ?>