1 | <?php |
||
19 | class EmailAddress |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * @var string $email_address |
||
24 | */ |
||
25 | private $email_address; |
||
26 | |||
27 | |||
28 | |||
29 | /** |
||
30 | * EmailAddress constructor. |
||
31 | * |
||
32 | * @param string $email_address |
||
33 | * @param EmailValidatorInterface $validator |
||
34 | * @throws EmailValidationException |
||
35 | */ |
||
36 | public function __construct($email_address, EmailValidatorInterface $validator) |
||
41 | |||
42 | |||
43 | |||
44 | /** |
||
45 | * returns the string value for this EmailAddress |
||
46 | * |
||
47 | * @return string |
||
48 | */ |
||
49 | public function get() |
||
53 | |||
54 | |||
55 | |||
56 | /** |
||
57 | * compare another EmailAddress to this one to determine if they are the same |
||
58 | * |
||
59 | * @param EmailAddress $address |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function equals(EmailAddress $address) |
||
66 | |||
67 | |||
68 | /** |
||
69 | * allows an EmailAddress object to be used as a string |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function __toString() |
||
77 | |||
78 | |||
79 | |||
80 | } |
||
81 | // Location: EmailAddress.php |
||
82 |