to = $to; $this->subject = $subject; $this->sentAt = $sentAt ? : new \DateTime(); $this->from = $from; } /** * Set the sender * * @param \Chamilo\ThemeBundle\Model\UserInterface $from * * @return $this */ public function setFrom(UserInterface $from) { $this->from = $from; return $this; } /** * Get the Sender * * @return \Chamilo\ThemeBundle\Model\UserInterface */ public function getFrom() { return $this->from; } /** * Set the date sent * * @param \DateTime $sentAt * * @return $this */ public function setSentAt(\DateTime $sentAt) { $this->sentAt = $sentAt; return $this; } /** * Get the date sent * * @return \DateTime */ public function getSentAt() { return $this->sentAt; } /** * Set the subject * * @param string $subject * * @return $this */ public function setSubject($subject) { $this->subject = $subject; return $this; } /** * Get the subject * * @return string */ public function getSubject() { return $this->subject; } /** * Set the recipient * * @param \Chamilo\ThemeBundle\Model\UserInterface $to * * @return $this */ public function setTo(UserInterface $to) { $this->to = $to; return $this; } /** * Get the recipient * * @return \Chamilo\ThemeBundle\Model\UserInterface */ public function getTo() { return $this->to; } /** * Get the identifier * * @return string */ public function getIdentifier() { return $this->getSubject(); } }