1 | <?php namespace nyx\notify\transports\mail; |
||
12 | class Message extends \Swift_Message |
||
13 | { |
||
14 | /** |
||
15 | * @var array The Message's views. |
||
16 | */ |
||
17 | protected $views = []; |
||
18 | |||
19 | /** |
||
20 | * @var array The data to pass to the Message's views. |
||
21 | */ |
||
22 | protected $viewData = []; |
||
23 | |||
24 | /** |
||
25 | * Creates a new Mail Message instance. |
||
26 | * |
||
27 | * Note: Explicitly not calling (direct) parent constructor. |
||
28 | * |
||
29 | * @param array $views The Message's views. |
||
30 | * @param string $subject The subject of the Message. |
||
31 | * @param string $charset The character set of the Message (defaults to UTF-8). |
||
32 | */ |
||
33 | public function __construct(array $views = null, string $subject = null, string $charset = 'UTF-8') |
||
50 | |||
51 | /** |
||
52 | * Returns the Message's views. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | public function getViews() : array |
||
60 | |||
61 | /** |
||
62 | * Sets the Message's views. |
||
63 | * |
||
64 | * @param array $views The names of the views to associate. |
||
65 | * @return $this |
||
66 | */ |
||
67 | public function setViews(array $views) : Message |
||
73 | |||
74 | /** |
||
75 | * Returns the data to pass to the Message's views. |
||
76 | * |
||
77 | * @return array |
||
78 | */ |
||
79 | public function getViewData() : array |
||
84 | |||
85 | /** |
||
86 | * Sets the data to pass to the Message's views. |
||
87 | * |
||
88 | * @param mixed $key The key the value will be available under or an array of key -> value pairs |
||
89 | * when associating multiple values. |
||
90 | * @param mixed $value The value to set the specified key as (ignored if the key is an array). |
||
91 | * @return $this |
||
92 | */ |
||
93 | public function with($key, $value = null) |
||
103 | } |
||
104 |