1 | <?php |
||
18 | final class FormattedMessageFactory |
||
19 | { |
||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private $attachments = []; |
||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | private $embedImages = []; |
||
28 | /** |
||
29 | * @var string |
||
30 | */ |
||
31 | private $html; |
||
32 | /** |
||
33 | * @var AlternativeText |
||
34 | */ |
||
35 | private $text; |
||
36 | |||
37 | /** |
||
38 | * @param string $html |
||
39 | * @return FormattedMessageFactory |
||
40 | */ |
||
41 | 3 | public function withHtml(string $html): FormattedMessageFactory |
|
48 | |||
49 | /** |
||
50 | * @param string $html |
||
51 | * @return FormattedMessageFactory |
||
52 | */ |
||
53 | 2 | public function withHtmlAndNoGeneratedAlternativeText(string $html): FormattedMessageFactory |
|
59 | |||
60 | /** |
||
61 | * @param AlternativeText $text |
||
62 | * @return FormattedMessageFactory |
||
63 | */ |
||
64 | 2 | public function withAlternativeText(AlternativeText $text): FormattedMessageFactory |
|
70 | |||
71 | /** |
||
72 | * @param PartInterface $part |
||
73 | * @return FormattedMessageFactory |
||
74 | */ |
||
75 | 5 | public function withAttachment(PartInterface $part): FormattedMessageFactory |
|
94 | |||
95 | /** |
||
96 | * @param EmbeddedImage $embeddedImage |
||
97 | * @return FormattedMessageFactory |
||
98 | */ |
||
99 | 3 | public function withEmbeddedImage(EmbeddedImage $embeddedImage): FormattedMessageFactory |
|
105 | |||
106 | /** |
||
107 | * @return MessageInterface |
||
108 | */ |
||
109 | 5 | public function createMessage(): MessageInterface |
|
113 | |||
114 | /** |
||
115 | * @return PartInterface |
||
116 | */ |
||
117 | 5 | private function createMessageRoot(): PartInterface |
|
131 | |||
132 | /** |
||
133 | * @return PartInterface |
||
134 | */ |
||
135 | 5 | private function createMessageHumanReadable(): PartInterface |
|
148 | |||
149 | /** |
||
150 | * @return PartInterface |
||
151 | */ |
||
152 | 5 | private function createMessageText(): PartInterface |
|
173 | } |