Warning.php 696 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace Egulias\EmailValidator\Warning;
  3. abstract class Warning
  4. {
  5. const CODE = 0;
  6. /**
  7. * @var string
  8. */
  9. protected $message = '';
  10. /**
  11. * @var int
  12. */
  13. protected $rfcNumber = 0;
  14. /**
  15. * @return string
  16. */
  17. public function message()
  18. {
  19. return $this->message;
  20. }
  21. /**
  22. * @return int
  23. */
  24. public function code()
  25. {
  26. return self::CODE;
  27. }
  28. /**
  29. * @return int
  30. */
  31. public function RFCNumber()
  32. {
  33. return $this->rfcNumber;
  34. }
  35. public function __toString()
  36. {
  37. return $this->message() . " rfc: " . $this->rfcNumber . "interal code: " . static::CODE;
  38. }
  39. }