Warning.php 510 B

12345678910111213141516171819202122232425262728293031
  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. }