diff --git a/lib/Entities/NewsletterLinkEntity.php b/lib/Entities/NewsletterLinkEntity.php index f90dd24788..20e6fbe45f 100644 --- a/lib/Entities/NewsletterLinkEntity.php +++ b/lib/Entities/NewsletterLinkEntity.php @@ -22,20 +22,20 @@ class NewsletterLinkEntity { /** * @ORM\ManyToOne(targetEntity="MailPoet\Entities\NewsletterEntity") * @ORM\JoinColumn(name="newsletter_id", referencedColumnName="id") - * @var NewsletterEntity|null + * @var NewsletterEntity */ private $newsletter; /** * @ORM\ManyToOne(targetEntity="MailPoet\Entities\SendingQueueEntity") * @ORM\JoinColumn(name="queue_id", referencedColumnName="id") - * @var SendingQueueEntity|null + * @var SendingQueueEntity */ private $queue; /** * @ORM\Column(type="string") - * @var string|null + * @var string */ private $url; @@ -54,6 +54,13 @@ class NewsletterLinkEntity { */ private $clicks; + public function __construct(NewsletterEntity $newsletter, SendingQueueEntity $queue, string $url, string $hash) { + $this->newsletter = $newsletter; + $this->queue = $queue; + $this->url = $url; + $this->hash = $hash; + } + /** * @return NewsletterEntity|null */ @@ -70,17 +77,11 @@ class NewsletterLinkEntity { return $this->queue; } - /** - * @return string|null - */ - public function getUrl() { + public function getUrl(): string { return $this->url; } - /** - * @return string|null - */ - public function getHash() { + public function getHash(): string { return $this->hash; } diff --git a/lib/Entities/StatisticsClickEntity.php b/lib/Entities/StatisticsClickEntity.php index aab0af2be5..f1aa6ae7d1 100644 --- a/lib/Entities/StatisticsClickEntity.php +++ b/lib/Entities/StatisticsClickEntity.php @@ -73,4 +73,39 @@ class StatisticsClickEntity { $this->safelyLoadToOneAssociation('link'); return $this->link; } + + /** + * @param NewsletterEntity|null $newsletter + */ + public function setNewsletter($newsletter) { + $this->newsletter = $newsletter; + } + + /** + * @param SendingQueueEntity|null $queue + */ + public function setQueue($queue) { + $this->queue = $queue; + } + + /** + * @param int|null $subscriberId + */ + public function setSubscriberId($subscriberId) { + $this->subscriberId = $subscriberId; + } + + /** + * @param NewsletterLinkEntity|null $link + */ + public function setLink($link) { + $this->link = $link; + } + + /** + * @param int $count + */ + public function setCount(int $count) { + $this->count = $count; + } } diff --git a/lib/Entities/StatisticsOpenEntity.php b/lib/Entities/StatisticsOpenEntity.php index 4e53c456fe..7444b265e7 100644 --- a/lib/Entities/StatisticsOpenEntity.php +++ b/lib/Entities/StatisticsOpenEntity.php @@ -51,4 +51,25 @@ class StatisticsOpenEntity { $this->safelyLoadToOneAssociation('queue'); return $this->queue; } + + /** + * @param NewsletterEntity|null $newsletter + */ + public function setNewsletter($newsletter) { + $this->newsletter = $newsletter; + } + + /** + * @param SendingQueueEntity|null $queue + */ + public function setQueue($queue) { + $this->queue = $queue; + } + + /** + * @param int|null $subscriberId + */ + public function setSubscriberId($subscriberId) { + $this->subscriberId = $subscriberId; + } } diff --git a/lib/Entities/StatisticsWooCommercePurchaseEntity.php b/lib/Entities/StatisticsWooCommercePurchaseEntity.php index 0f7df60706..d9027bd57a 100644 --- a/lib/Entities/StatisticsWooCommercePurchaseEntity.php +++ b/lib/Entities/StatisticsWooCommercePurchaseEntity.php @@ -111,4 +111,11 @@ class StatisticsWooCommercePurchaseEntity { public function getOrderId() { return $this->orderId; } + + /** + * @param SubscriberEntity|null $subscriber + */ + public function setSubscriber($subscriber) { + $this->subscriber = $subscriber; + } }