Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. <?php
  2.  
  3. declare(strict_types = 1);
  4.  
  5. namespace SE20\Importer;
  6.  
  7. final class ImporterStatus {
  8.  
  9. /**
  10. * @var string[]
  11. */
  12. private $invalidEmails;
  13.  
  14. /**
  15. * @var array[]
  16. */
  17. private $statusChanges;
  18.  
  19. /**
  20. * @var array
  21. */
  22. private $newContactIds;
  23.  
  24. /**
  25. * @var array
  26. */
  27. private $existingContactIds;
  28.  
  29. /**
  30. * @var int[]
  31. */
  32. private $allContactIds;
  33.  
  34. /**
  35. * @var int[]
  36. */
  37. private $contactListIds;
  38.  
  39. public function __construct() {
  40. $this->invalidEmails = [];
  41. $this->statusChanges = [];
  42. $this->allContactIds = [];
  43. $this->contactListIds = [];
  44. $this->newContactIds = [];
  45. $this->existingContactIds = [];
  46. }
  47.  
  48. public function addInvalidEmail(string $invalidEmail) {
  49. $this->invalidEmails[] = $invalidEmail;
  50. }
  51.  
  52. public function addStatusChange(array $statusChange) {
  53. $this->statusChanges[] = $statusChange;
  54. $this->contactListIds[$statusChange['contactlist_id']] = $statusChange['contactlist_id'];
  55. }
  56.  
  57. public function setNewContactIds(array $ids) {
  58. $this->newContactIds = $ids;
  59. }
  60.  
  61. public function setExistingContactIds(array $ids) {
  62. $this->existingContactIds = $ids;
  63. }
  64.  
  65. public function setAllContactIds(array $ids) {
  66. $this->allContactIds = $ids;
  67. }
  68.  
  69. /**
  70. * @return array
  71. */
  72. public function & getInvalidEmails() : array {
  73. return $this->invalidEmails;
  74. }
  75.  
  76. /**
  77. * @return array
  78. */
  79. public function & getStatusChanges() : array {
  80. return $this->statusChanges;
  81. }
  82.  
  83. /**
  84. * @return int[]
  85. */
  86. public function & getAllContactIds() : array {
  87. return $this->allContactIds;
  88. }
  89.  
  90. /**
  91. * @return int[]
  92. */
  93. public function & getContactListIds() : array {
  94. return $this->contactListIds;
  95. }
  96.  
  97. /**
  98. * @return int[]
  99. */
  100. public function & getNewContactIds() : array {
  101. return $this->newContactIds;
  102. }
  103.  
  104. /**
  105. * @return int[]
  106. */
  107. public function & getExistingContactIds() : array {
  108. return $this->existingContactIds;
  109. }
  110.  
  111. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement