mirror of
https://github.com/pierre42100/ComunicAPI
synced 2025-07-10 20:12:53 +00:00
3rdparty
RestControllers
bin
classes
components
models
APIClient.php
AccountImageSettings.php
AdvancedGroupInfo.php
AdvancedUser.php
BaseUniqueObject.php
BaseUniqueObjectFromUser.php
BaseUserModel.php
CallInformation.php
CallMemberInformation.php
CallsConfig.php
Comment.php
ConversationInfo.php
ConversationMessage.php
Friend.php
GeneralSettings.php
GroupInfo.php
GroupMember.php
GroupSettings.php
LanguageSettings.php
Movie.php
NewAccount.php
NewConversationMessage.php
NewGroup.php
Notification.php
Post.php
SearchResult.php
SecuritySettings.php
Survey.php
SurveyChoice.php
SurveyResponse.php
UnreadConversation.php
User.php
UserLike.php
.htaccess
APIClients.php
APILimits.php
Components.php
DBLibrary.php
URLanalyzer.php
comunicAPI.php
config.php
config
functions
helpers
tests
.gitignore
.htaccess
LICENSE
README.md
db_struct.sql
index.php
init.php
40 lines
720 B
PHP
40 lines
720 B
PHP
<?php
|
|
/**
|
|
* Survey choice model
|
|
*
|
|
* @author Pierre HUBERT
|
|
*/
|
|
|
|
class SurveyChoice extends BaseUniqueObject {
|
|
|
|
//Private fields
|
|
private $name;
|
|
private $responses;
|
|
|
|
//Set and get name
|
|
public function set_name(string $name){
|
|
$this->name = $name == "" ? null : $name;
|
|
}
|
|
|
|
public function has_name() : bool {
|
|
return $this->name != null;
|
|
}
|
|
|
|
public function get_name() : string {
|
|
return $this->name != null ? $this->name : "null";
|
|
}
|
|
|
|
//Set and get the number of responses
|
|
public function set_responses(int $responses){
|
|
$this->responses = $responses;
|
|
}
|
|
|
|
public function has_responses() : bool {
|
|
return $this->responses > 0;
|
|
}
|
|
|
|
public function get_responses() : int {
|
|
return $this->responses;
|
|
}
|
|
|
|
} |