CustomFieldEntity.php
2 months ago
DynamicSegmentFilterData.php
2 months ago
DynamicSegmentFilterEntity.php
3 years ago
FeatureFlagEntity.php
3 years ago
FormEntity.php
1 week ago
LogEntity.php
3 years ago
NewsletterEntity.php
2 months ago
NewsletterLinkEntity.php
3 years ago
NewsletterOptionEntity.php
3 years ago
NewsletterOptionFieldEntity.php
1 month ago
NewsletterPostEntity.php
3 years ago
NewsletterSegmentEntity.php
3 years ago
NewsletterTemplateEntity.php
3 years ago
ScheduledTaskEntity.php
1 month ago
ScheduledTaskSubscriberEntity.php
1 year ago
SegmentEntity.php
2 months ago
SendingQueueEntity.php
2 months ago
SettingEntity.php
3 years ago
StatisticsBounceEntity.php
3 years ago
StatisticsClickEntity.php
3 years ago
StatisticsFormEntity.php
3 years ago
StatisticsNewsletterEntity.php
1 year ago
StatisticsOpenEntity.php
3 years ago
StatisticsUnsubscribeEntity.php
2 months ago
StatisticsWooCommercePurchaseEntity.php
2 years ago
StatsNotificationEntity.php
3 years ago
SubscriberCustomFieldEntity.php
3 years ago
SubscriberEntity.php
5 days ago
SubscriberIPEntity.php
3 years ago
SubscriberSegmentEntity.php
3 years ago
SubscriberTagEntity.php
4 years ago
TagEntity.php
3 years ago
UserAgentEntity.php
3 years ago
UserFlagEntity.php
3 years ago
WpPostEntity.php
2 years ago
index.php
3 years ago
FeatureFlagEntity.php
66 lines
| 1 | <?php // phpcs:ignore SlevomatCodingStandard.TypeHints.DeclareStrictTypes.DeclareStrictTypesMissing |
| 2 | |
| 3 | namespace MailPoet\Entities; |
| 4 | |
| 5 | if (!defined('ABSPATH')) exit; |
| 6 | |
| 7 | |
| 8 | use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait; |
| 9 | use MailPoet\Doctrine\EntityTraits\CreatedAtTrait; |
| 10 | use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait; |
| 11 | use MailPoetVendor\Doctrine\ORM\Mapping as ORM; |
| 12 | |
| 13 | /** |
| 14 | * @ORM\Entity() |
| 15 | * @ORM\Table(name="feature_flags", uniqueConstraints={@ORM\UniqueConstraint(name="name",columns={"name"})}) |
| 16 | */ |
| 17 | class FeatureFlagEntity { |
| 18 | use AutoincrementedIdTrait; |
| 19 | use CreatedAtTrait; |
| 20 | use UpdatedAtTrait; |
| 21 | |
| 22 | /** |
| 23 | * @ORM\Column(type="string", nullable=false, unique=true) |
| 24 | * @var string |
| 25 | */ |
| 26 | private $name; |
| 27 | |
| 28 | /** |
| 29 | * @ORM\Column(type="boolean", nullable=true) |
| 30 | * @var bool|null |
| 31 | */ |
| 32 | private $value; |
| 33 | |
| 34 | /** |
| 35 | * @param string $name |
| 36 | * @param bool|null $value |
| 37 | */ |
| 38 | public function __construct( |
| 39 | $name, |
| 40 | $value = null |
| 41 | ) { |
| 42 | $this->name = $name; |
| 43 | $this->value = $value; |
| 44 | } |
| 45 | |
| 46 | /** @return string */ |
| 47 | public function getName() { |
| 48 | return $this->name; |
| 49 | } |
| 50 | |
| 51 | /** @param string $name */ |
| 52 | public function setName($name) { |
| 53 | $this->name = $name; |
| 54 | } |
| 55 | |
| 56 | /** @return bool|null */ |
| 57 | public function getValue() { |
| 58 | return $this->value; |
| 59 | } |
| 60 | |
| 61 | /** @param bool|null $value */ |
| 62 | public function setValue($value) { |
| 63 | $this->value = $value; |
| 64 | } |
| 65 | } |
| 66 |