Nenhuma Descrição

SubscriberStatistics.php 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?php
  2. namespace MailPoet\Subscribers\Statistics;
  3. if (!defined('ABSPATH')) exit;
  4. use MailPoet\Newsletter\Statistics\WooCommerceRevenue;
  5. class SubscriberStatistics {
  6. /** @var int */
  7. private $clickCount;
  8. /** @var int */
  9. private $openCount;
  10. /** @var int */
  11. private $machineOpenCount;
  12. /** @var int */
  13. private $totalSentCount;
  14. /** @var WooCommerceRevenue|null */
  15. private $wooCommerceRevenue;
  16. public function __construct(
  17. $clickCount,
  18. $openCount,
  19. $machineOpenCount,
  20. $totalSentCount,
  21. $wooCommerceRevenue = null
  22. ) {
  23. $this->clickCount = $clickCount;
  24. $this->openCount = $openCount;
  25. $this->machineOpenCount = $machineOpenCount;
  26. $this->totalSentCount = $totalSentCount;
  27. $this->wooCommerceRevenue = $wooCommerceRevenue;
  28. }
  29. public function getClickCount(): int {
  30. return $this->clickCount;
  31. }
  32. public function getOpenCount(): int {
  33. return $this->openCount;
  34. }
  35. public function getMachineOpenCount(): int {
  36. return $this->machineOpenCount;
  37. }
  38. public function getTotalSentCount(): int {
  39. return $this->totalSentCount;
  40. }
  41. /**
  42. * @return WooCommerceRevenue|null
  43. */
  44. public function getWooCommerceRevenue() {
  45. return $this->wooCommerceRevenue;
  46. }
  47. }