for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace CallCenter\Bundle\CommonBundle\Traits;
use DateTime;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
trait TimestampableEntity
{
/**
* @var DateTime
*
* @Gedmo\Timestampable(
* on="create"
* )
* @ORM\Column(
* name="created_at",
* type="datetime"
*/
protected $createdAt;
* on="update"
* name="updated_at",
protected $updatedAt;
* Sets createdAt.
* @param DateTime $createdAt
* @return $this
public function setCreatedAt(DateTime $createdAt)
$this->createdAt = $createdAt;
return $this;
}
* Returns createdAt.
* @return DateTime
public function getCreatedAt()
return $this->createdAt;
* Sets updatedAt.
* @param DateTime $updatedAt
public function setUpdatedAt(DateTime $updatedAt)
$this->updatedAt = $updatedAt;
* Returns updatedAt.
public function getUpdatedAt()
return $this->updatedAt;