mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-06-19 08:35:18 +00:00
Can get all the response of a user to a survey into a SurveyResponse object
This commit is contained in:
40
classes/models/SurveyResponse.php
Normal file
40
classes/models/SurveyResponse.php
Normal 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;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user