TextMessage.class.php

Go to the documentation of this file.
00001 <?php
00002 /***************************************************************************
00003  *   Copyright (C) 2009 by Ivan Y. Khvostishkov                            *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU Lesser General Public License as        *
00007  *   published by the Free Software Foundation; either version 3 of the    *
00008  *   License, or (at your option) any later version.                       *
00009  *                                                                         *
00010  ***************************************************************************/
00011 
00012 
00013     final class TextMessage implements Message
00014     {
00015         private $timestamp  = null;
00016         private $text       = null;
00017 
00018         public static function create()
00019         {
00020             return new self;
00021         }
00022 
00023         public function __construct()
00024         {
00025             $this->timestamp = Timestamp::makeNow();
00026         }
00027 
00028         public function setTimestamp($timestamp)
00029         {
00030             $this->timestamp = $timestamp;
00031 
00032             return $this;
00033         }
00034 
00035         public function getTimestamp()
00036         {
00037             return $this->timestamp;
00038         }
00039 
00040         public function setText($text)
00041         {
00042             $this->text = $text;
00043 
00044             return $this;
00045         }
00046 
00047         public function getText()
00048         {
00049             return $this->text;
00050         }
00051     }
00052 ?>