AutoincrementedIdTrait.php
3 years ago
CreatedAtTrait.php
3 years ago
DeletedAtTrait.php
3 years ago
SafeToOneAssociationLoadTrait.php
3 years ago
UpdatedAtTrait.php
3 years ago
ValidationGroupsTrait.php
2 years ago
index.php
3 years ago
UpdatedAtTrait.php
27 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 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 UpdatedAtTrait { |
| 12 | /** |
| 13 | * @ORM\Column(type="datetimetz") |
| 14 | * @var DateTimeInterface |
| 15 | */ |
| 16 | private $updatedAt; |
| 17 | |
| 18 | /** @return DateTimeInterface */ |
| 19 | public function getUpdatedAt() { |
| 20 | return $this->updatedAt; |
| 21 | } |
| 22 | |
| 23 | public function setUpdatedAt(DateTimeInterface $updatedAt) { |
| 24 | $this->updatedAt = $updatedAt; |
| 25 | } |
| 26 | } |
| 27 |