Warning.php 510 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace Egulias\EmailValidator\Warning;
  3. abstract class Warning
  4. {
  5. const CODE = 0;
  6. protected $message;
  7. protected $rfcNumber;
  8. public function message()
  9. {
  10. return $this->message;
  11. }
  12. public function code()
  13. {
  14. return self::CODE;
  15. }
  16. public function RFCNumber()
  17. {
  18. return $this->rfcNumber;
  19. }
  20. public function __toString()
  21. {
  22. return $this->message() . " rfc: " . $this->rfcNumber . "interal code: " . static::CODE;
  23. }
  24. }