1 | <?php |
||
7 | class Message implements MessageContract |
||
8 | { |
||
9 | /** |
||
10 | * From addresses. |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $from; |
||
15 | |||
16 | /** |
||
17 | * Recipients addresses. |
||
18 | * |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $to; |
||
22 | |||
23 | /** |
||
24 | * CC addresses. |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | protected $cc; |
||
29 | |||
30 | /** |
||
31 | * BCC addresses. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $bcc; |
||
36 | |||
37 | /** |
||
38 | * Subject. |
||
39 | * |
||
40 | * @var string |
||
41 | */ |
||
42 | protected $subject; |
||
43 | |||
44 | /** |
||
45 | * Text. |
||
46 | * |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $text; |
||
50 | |||
51 | /** |
||
52 | * HTML. |
||
53 | * |
||
54 | * @var string |
||
55 | */ |
||
56 | protected $html; |
||
57 | |||
58 | /** |
||
59 | * Attachments. |
||
60 | * |
||
61 | * @var array |
||
62 | */ |
||
63 | protected $attach; |
||
64 | |||
65 | /** |
||
66 | * Attachments with inline disposition. |
||
67 | * |
||
68 | * @var array |
||
69 | */ |
||
70 | protected $inline; |
||
71 | |||
72 | /** |
||
73 | * Construct. |
||
74 | */ |
||
75 | public function __construct() |
||
80 | |||
81 | /** |
||
82 | * Add a "from" address to the message. |
||
83 | * |
||
84 | * @param string $address |
||
85 | * @param string $name |
||
86 | * |
||
87 | * @return self |
||
88 | */ |
||
89 | public function addFrom($address, $name = null) |
||
95 | |||
96 | /** |
||
97 | * Get "from" addresses. |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | public function getFrom() |
||
105 | |||
106 | /** |
||
107 | * Add a recipient to the message. |
||
108 | * |
||
109 | * @param string $address |
||
110 | * @param string $name |
||
111 | * |
||
112 | * @return self |
||
113 | */ |
||
114 | public function addTo($address, $name = null) |
||
120 | |||
121 | /** |
||
122 | * Get recipients addresses. |
||
123 | * |
||
124 | * @return array |
||
125 | */ |
||
126 | public function getTo() |
||
130 | |||
131 | /** |
||
132 | * Add a carbon copy to the message. |
||
133 | * |
||
134 | * @param string $address |
||
135 | * @param string $name |
||
136 | * |
||
137 | * @return self |
||
138 | */ |
||
139 | public function addCc($address, $name = null) |
||
145 | |||
146 | /** |
||
147 | * Get carbon copies addresses. |
||
148 | * |
||
149 | * @return array |
||
150 | */ |
||
151 | public function getCc() |
||
155 | |||
156 | /** |
||
157 | * Add a blind carbon copy to the message. |
||
158 | * |
||
159 | * @param string $address |
||
160 | * @param string $name |
||
161 | * |
||
162 | * @return self |
||
163 | */ |
||
164 | public function addBcc($address, $name = null) |
||
170 | |||
171 | /** |
||
172 | * Get blind carbon copies addresses. |
||
173 | * |
||
174 | * @return array |
||
175 | */ |
||
176 | public function getBcc() |
||
180 | |||
181 | /** |
||
182 | * Set the subject of the message. |
||
183 | * |
||
184 | * @param string $subject |
||
185 | * |
||
186 | * @return self |
||
187 | */ |
||
188 | public function setSubject($subject) |
||
194 | |||
195 | /** |
||
196 | * Get subject. |
||
197 | * |
||
198 | * @return string |
||
199 | */ |
||
200 | public function getSubject() |
||
204 | |||
205 | /** |
||
206 | * Set the text of the message. |
||
207 | * |
||
208 | * @param string $text |
||
209 | * |
||
210 | * @return $this |
||
211 | */ |
||
212 | public function setText($text) |
||
218 | |||
219 | /** |
||
220 | * Get text. |
||
221 | * |
||
222 | * @return string |
||
223 | */ |
||
224 | public function getText() |
||
228 | |||
229 | /** |
||
230 | * Set the html of the message. |
||
231 | * |
||
232 | * @param string $html |
||
233 | * |
||
234 | * @return $this |
||
235 | */ |
||
236 | public function setHtml($html) |
||
242 | |||
243 | /** |
||
244 | * Get HTML. |
||
245 | * |
||
246 | * @return string |
||
247 | */ |
||
248 | public function getHtml() |
||
252 | |||
253 | /** |
||
254 | * Attach a file to the message. |
||
255 | * |
||
256 | * @param string $file |
||
257 | * @param array $options |
||
258 | * |
||
259 | * @return $this |
||
260 | */ |
||
261 | public function attach($file, array $options = []) |
||
267 | |||
268 | /** |
||
269 | * Get attachments. |
||
270 | * |
||
271 | * @return array |
||
272 | */ |
||
273 | public function getAttachments() |
||
277 | |||
278 | /** |
||
279 | * Attach a file to the message with inline disposition. |
||
280 | * |
||
281 | * @param string $file |
||
282 | * @param array $options |
||
283 | * |
||
284 | * @return $this |
||
285 | */ |
||
286 | public function inline($file, array $options = []) |
||
292 | |||
293 | /** |
||
294 | * Get inlines attachments. |
||
295 | * |
||
296 | * @return array |
||
297 | */ |
||
298 | public function getInlines() |
||
302 | } |
||
303 |