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