1 | <?php |
||
18 | class Mail extends Module |
||
19 | { |
||
20 | |||
21 | /** |
||
22 | * @param Config $config |
||
23 | */ |
||
24 | public function __construct(Config $config) |
||
28 | |||
29 | /** |
||
30 | * Implements hook "library.list" |
||
31 | * @param array $libraries |
||
32 | */ |
||
33 | public function hookLibraryList(array &$libraries) |
||
52 | |||
53 | /** |
||
54 | * Implements hook "route.list" |
||
55 | * @param array $routes |
||
56 | */ |
||
57 | public function hookRouteList(array &$routes) |
||
66 | |||
67 | /** |
||
68 | * Implements hook "mail.send" |
||
69 | * @param array $to |
||
70 | * @param string $subject |
||
71 | * @param string $message |
||
72 | * @param array $options |
||
73 | * @param mixed $result |
||
74 | */ |
||
75 | public function hookMailSend($to, $subject, $message, $options, &$result) |
||
79 | |||
80 | /** |
||
81 | * Implements hook "module.enable.after" |
||
82 | */ |
||
83 | public function hookModuleEnableAfter() |
||
87 | |||
88 | /** |
||
89 | * Implements hook "module.disable.after" |
||
90 | */ |
||
91 | public function hookModuleDisableAfter() |
||
95 | |||
96 | /** |
||
97 | * Implements hook "module.install.after" |
||
98 | */ |
||
99 | public function hookModuleInstallAfter() |
||
103 | |||
104 | /** |
||
105 | * Implements hook "module.uninstall.after" |
||
106 | */ |
||
107 | public function hookModuleUninstallAfter() |
||
111 | |||
112 | /** |
||
113 | * Returns PHPMailer instance |
||
114 | * @return \PHPMailer |
||
115 | * @throws \InvalidArgumentException |
||
116 | */ |
||
117 | public function getMailerInstance() |
||
127 | |||
128 | /** |
||
129 | * Send an E-mail |
||
130 | * @param array $to |
||
131 | * @param string $subject |
||
132 | * @param string $message |
||
133 | * @param array $options |
||
134 | * @param array $settings |
||
135 | * @return boolean|string |
||
136 | */ |
||
137 | public function send($to, $subject, $message, $options, $settings) |
||
181 | |||
182 | /** |
||
183 | * @param array $to |
||
184 | * @param string $subject |
||
185 | * @param string $message |
||
186 | * @param array $options |
||
187 | * @param mixed $result |
||
188 | */ |
||
189 | protected function setMailer($to, $subject, $message, $options, &$result) |
||
199 | |||
200 | } |
||
201 |