1 | <?php |
||
12 | class Email { |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $content; |
||
18 | |||
19 | /** |
||
20 | * @var string[] |
||
21 | */ |
||
22 | protected $links = array(); |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $subject; |
||
28 | |||
29 | /** |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $to; |
||
33 | |||
34 | /** |
||
35 | * @param string[] $data |
||
36 | */ |
||
37 | public function __construct($data) |
||
44 | |||
45 | /** |
||
46 | * @return string |
||
47 | */ |
||
48 | public function getContent() |
||
52 | |||
53 | /** |
||
54 | * @return string[] the urls of all links in the email |
||
55 | */ |
||
56 | public function getLinks() |
||
60 | |||
61 | /** |
||
62 | * @param string $pattern regular expression |
||
63 | * |
||
64 | * @return \string[] the urls matching the pattern |
||
65 | */ |
||
66 | public function getLinksMatching($pattern) |
||
74 | |||
75 | /** |
||
76 | * @return string |
||
77 | */ |
||
78 | public function getSubject() |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | public function getTo() |
||
90 | } |
||
91 |