From f84a8df0d8b8fb368498ac8a6d6b93db47eacf88 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 23 Apr 2018 19:08:54 +0200 Subject: [PATCH] Created conversation message object --- classes/models/ConversationMessage.php | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 classes/models/ConversationMessage.php diff --git a/classes/models/ConversationMessage.php b/classes/models/ConversationMessage.php new file mode 100644 index 0000000..56c924b --- /dev/null +++ b/classes/models/ConversationMessage.php @@ -0,0 +1,40 @@ +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"; + } + + + //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"; + } +} \ No newline at end of file