1 | <?php |
||
9 | class EmailDestination extends Destination |
||
10 | { |
||
11 | /** |
||
12 | * @var string[] |
||
13 | */ |
||
14 | protected $to; |
||
15 | |||
16 | /** |
||
17 | * @var string[] |
||
18 | */ |
||
19 | protected $cc; |
||
20 | |||
21 | /** |
||
22 | * @var string[] |
||
23 | */ |
||
24 | protected $bcc; |
||
25 | |||
26 | /** |
||
27 | * @var SmtpConfiguration |
||
28 | */ |
||
29 | protected $smtpConfiguration; |
||
30 | |||
31 | /** |
||
32 | * @var null|string |
||
33 | */ |
||
34 | protected $from; |
||
35 | |||
36 | /** |
||
37 | * @param array $to |
||
38 | * @param array $cc |
||
39 | * @param array $bcc |
||
40 | * @param SmtpConfiguration|null $smtpConfiguration |
||
41 | * @param EmailAddress|null $from |
||
42 | */ |
||
43 | 28 | public function __construct( |
|
56 | |||
57 | /** |
||
58 | * @return EmailAddress[] |
||
59 | */ |
||
60 | 3 | public function to(): array |
|
64 | |||
65 | /** |
||
66 | * @return EmailAddress[] |
||
67 | */ |
||
68 | 3 | public function cc(): array |
|
72 | |||
73 | /** |
||
74 | * @return EmailAddress[] |
||
75 | */ |
||
76 | 3 | public function bcc(): array |
|
80 | |||
81 | /** |
||
82 | * @return null|SmtpConfiguration |
||
83 | */ |
||
84 | 3 | public function smtpConfiguration(): ?SmtpConfiguration |
|
88 | |||
89 | /** |
||
90 | * @return null|EmailAddress |
||
91 | */ |
||
92 | 1 | public function from(): ?EmailAddress |
|
96 | |||
97 | /** |
||
98 | * @param EmailAddress[] $emailAddresses |
||
99 | * @return string[] |
||
100 | */ |
||
101 | 28 | protected static function toStringArray(array $emailAddresses) |
|
107 | |||
108 | /** |
||
109 | * @param string[] $emailAddresses |
||
110 | * @return EmailAddress[] |
||
111 | */ |
||
112 | 7 | protected static function toObjectArray(array $emailAddresses): array |
|
118 | |||
119 | /** |
||
120 | * @return string |
||
121 | */ |
||
122 | 7 | public function jsonRepresentation(): string |
|
139 | |||
140 | /** |
||
141 | * {@inheritdoc} |
||
142 | */ |
||
143 | 5 | public static function fromJsonRepresentation(string $jsonRepresentation): Destination |
|
162 | } |
||
163 |