1
0
mirror of https://github.com/pierre42100/ComunicAPI synced 2025-07-11 20:42:51 +00:00
Files
3rdparty
RestControllers
bin
classes
components
models
APIClient.php
AccountImageSettings.php
AdvancedGroupInfo.php
AdvancedUser.php
BaseUniqueObject.php
BaseUniqueObjectFromUser.php
BaseUserModel.php
Comment.php
ConversationInfo.php
ConversationMessage.php
Friend.php
GeneralSettings.php
GroupInfo.php
GroupMember.php
GroupSettings.php
Movie.php
NewAccount.php
NewConversationMessage.php
NewGroup.php
Notification.php
Post.php
SecuritySettings.php
Survey.php
SurveyChoice.php
SurveyResponse.php
UnreadConversation.php
User.php
UserLike.php
.htaccess
APIClients.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
ComunicAPI/classes/models/ConversationMessage.php
2018-04-23 21:01:33 +02:00

44 lines
947 B
PHP

<?php
/**
* Conversation message object
*
* @author Pierre HUBERT
*/
class ConversationMessage extends BaseUniqueObjectFromUser {
//Private fields
private $image_path;
private $message;
//Set and get image path
public function set_image_path(string $image_path){
$this->image_path = $image_path == "" ? null : $image_path;
}
public function has_image_path() : bool {
return $this->image_path != null;
}
public function get_image_path() : string {
return $this->image_path != null ? $this->image_path : "null";
}
public function get_image_url() : string {
return path_user_data($this->get_image_path());
}
//Set and get message
public function set_message(string $message){
$this->message = $message == "" ? null : $message;
}
public function has_message() : bool {
return $this->message != null;
}
public function get_message() : string {
return $this->message != null ? $this->message : "null";
}
}