Can get all the response of a user to a survey into a SurveyResponse object

This commit is contained in:
Pierre
2018-05-13 19:16:10 +02:00
parent 8c2ba7fd31
commit 512f252c67
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,40 @@
<?php
/**
* Survey response object
*
* @author Pierre HUBERT
*/
class SurveyResponse extends BaseUniqueObjectFromUser {
//Private fields
private $surveyID;
private $choiceID;
//Set and get survey ID
public function set_surveyID(int $surveyID){
$this->surveyID = $surveyID;
}
public function has_surveyID() : bool {
return $this->surveyID > 0;
}
public function get_surveyID() : int {
return $this->surveyID;
}
//Set and get choice ID
public function set_choiceID(int $choiceID){
$this->choiceID = $choiceID;
}
public function has_choiceID() : bool {
return $this->choiceID > 0;
}
public function get_choiceID() : int {
return $this->choiceID;
}
}