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
index.php
3 years ago
AutoincrementedIdTrait.php
29 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 MailPoetVendor\Doctrine\ORM\Mapping as ORM; |
| 9 | |
| 10 | trait AutoincrementedIdTrait { |
| 11 | /** |
| 12 | * @ORM\Column(type="integer") |
| 13 | * @ORM\Id |
| 14 | * @ORM\GeneratedValue |
| 15 | * @var int|null |
| 16 | */ |
| 17 | private $id; |
| 18 | |
| 19 | /** @return int|null */ |
| 20 | public function getId() { |
| 21 | return $this->id; |
| 22 | } |
| 23 | |
| 24 | /** @param int|null $id */ |
| 25 | public function setId($id) { |
| 26 | $this->id = $id; |
| 27 | } |
| 28 | } |
| 29 |