* @package tao */ class Message { /** * Short description of attribute STATUS_WAITING * * @access public * @var int */ const STATUS_WAITING = 2; /** * Short description of attribute STATUS_SENT * * @access public * @var int */ const STATUS_SENT = 3; /** * Short description of attribute STATUS_ERROR * * @access public * @var int */ const STATUS_ERROR = 4; /** * Short description of attribute from * * @access protected * @var string */ protected $from = ''; /** * @var User */ protected $to = null; /** * Short description of attribute title * * @access protected * @var string */ protected $title = ''; /** * Short description of attribute body * * @access protected * @var string */ protected $body = ''; /** * Short description of attribute status * * @access protected * @var int */ protected $status = 0; // --- OPERATIONS --- /** * Short description of method __construct * * @access public * @author Bertrand Chevrier, * @return mixed */ public function __construct() { $this->status = self::STATUS_WAITING; } /** * Short description of method getFrom * * @access public * @author Bertrand Chevrier, * @return string */ public function getFrom() { return (string) $this->from; } /** * Short description of method setFrom * * @access public * @author Bertrand Chevrier, * @param string from * @return mixed */ public function setFrom($from) { $this->from = $from; } /** * User the message is to be send to * * @access public * @author Bertrand Chevrier, * @return User */ public function getTo() { return $this->to; } /** * Short description of method setTo * * @access public * @author Bertrand Chevrier, * @param string to */ public function setTo(User $to) { $this->to = $to; } /** * Short description of method getTitle * * @access public * @author Bertrand Chevrier, * @return string */ public function getTitle() { return (string) $this->title; } /** * Short description of method setTitle * * @access public * @author Bertrand Chevrier, * @param string title */ public function setTitle($title) { $this->title = $title; } /** * Short description of method getBody * * @access public * @author Bertrand Chevrier, * @return string */ public function getBody() { return (string) $this->body; } /** * Short description of method setBody * * @access public * @author Bertrand Chevrier, * @param string body * @return mixed */ public function setBody($body) { $this->body = $body; } /** * Short description of method getStatus * * @access public * @author Bertrand Chevrier, * @return int */ public function getStatus() { return (int) $this->status; } /** * Short description of method setStatus * * @access public * @author Bertrand Chevrier, * @param int status * @return mixed */ public function setStatus($status) { $this->status = $status; } }