03-customer.php 822 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace cx_newsletter;
  3. class customer
  4. extends database_item
  5. implements database_item_interface {
  6. public ?string $company = null;
  7. public ?string $name = null;
  8. public ?string $surname = null;
  9. public ?string $comments = null;
  10. public ?string $email = null;
  11. public ?string $phone_number = null;
  12. public ?bool $tester = null;
  13. public ?group $group = null;
  14. public function is_complete() : bool {
  15. if ($this->company === null) return false;
  16. if ($this->name === null) return false;
  17. if ($this->surname === null) return false;
  18. if ($this->comments === null) return false;
  19. if ($this->email === null) return false;
  20. if ($this->phone_number === null) return false;
  21. if ($this->tester === null) return false;
  22. return true;
  23. }
  24. }