AutoincrementedIdTrait.php
4 years ago
CreatedAtTrait.php
4 years ago
DeletedAtTrait.php
4 years ago
SafeToOneAssociationLoadTrait.php
4 years ago
UpdatedAtTrait.php
4 years ago
index.php
4 years ago
CreatedAtTrait.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace MailPoet\Doctrine\EntityTraits; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use DateTimeInterface; |
| 9 | use MailPoetVendor\Doctrine\ORM\Mapping as ORM; |
| 10 | |
| 11 | trait CreatedAtTrait { |
| 12 | /** |
| 13 | * @ORM\Column(type="datetimetz", nullable=true) |
| 14 | * @var DateTimeInterface|null |
| 15 | */ |
| 16 | private $createdAt; |
| 17 | |
| 18 | public function getCreatedAt(): ?DateTimeInterface { |
| 19 | return $this->createdAt; |
| 20 | } |
| 21 | |
| 22 | public function setCreatedAt(DateTimeInterface $createdAt): void { |
| 23 | $this->createdAt = $createdAt; |
| 24 | } |
| 25 | } |
| 26 |