for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the MilioooMessageBundle package.
*
* (c) Michiel boeckaert <[email protected]>
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Miliooo\Messaging\Form\FormModel;
use Miliooo\Messaging\User\ParticipantInterface;
/**
* The abstract new message class.
* This abstract class should be used by all the form models.
* Since it contains all the getters and setters for creating a message object.
* Both replying of a message or creating a thread also adds a message.
* @author Michiel Boeckaert <[email protected]>
abstract class AbstractNewMessage implements NewMessageInterface
{
* Body of the message
* @var string
protected $body;
* Creation time of the message
* @var \DateTime
protected $createdAt;
* Sender of the message
* @var ParticipantInterface
protected $sender;
* Constructor.
public function __construct()
//we will update this value in the form handler so we get the real value
$this->createdAt = new \DateTime('now');
}
* {@inheritdoc}
public function getBody()
return $this->body;
public function getCreatedAt()
return $this->createdAt;
public function getSender()
return $this->sender;
public function setBody($body)
$this->body = $body;
public function setCreatedAt(\DateTime $createdAt)
$this->createdAt = $createdAt;
public function setSender(\Miliooo\Messaging\User\ParticipantInterface $sender)
$this->sender = $sender;