1 | <?php |
||
20 | class Main |
||
21 | { |
||
22 | |||
23 | /** |
||
24 | * Module class instance |
||
25 | * @var \gplcart\core\Module $module |
||
26 | */ |
||
27 | protected $module; |
||
28 | |||
29 | /** |
||
30 | * Library class instance |
||
31 | * @var \gplcart\core\Library $library |
||
32 | */ |
||
33 | protected $library; |
||
34 | |||
35 | /** |
||
36 | * @param Module $module |
||
37 | * @param Library $library |
||
38 | */ |
||
39 | public function __construct(Module $module, Library $library) |
||
44 | |||
45 | /** |
||
46 | * Implements hook "library.list" |
||
47 | * @param array $libraries |
||
48 | */ |
||
49 | public function hookLibraryList(array &$libraries) |
||
68 | |||
69 | /** |
||
70 | * Implements hook "route.list" |
||
71 | * @param array $routes |
||
72 | */ |
||
73 | public function hookRouteList(array &$routes) |
||
82 | |||
83 | /** |
||
84 | * Implements hook "mail.send" |
||
85 | * @param array $to |
||
86 | * @param string $subject |
||
87 | * @param string $message |
||
88 | * @param array $options |
||
89 | * @param mixed $result |
||
90 | */ |
||
91 | public function hookMailSend($to, $subject, $message, $options, &$result) |
||
95 | |||
96 | /** |
||
97 | * Implements hook "module.enable.after" |
||
98 | */ |
||
99 | public function hookModuleEnableAfter() |
||
103 | |||
104 | /** |
||
105 | * Implements hook "module.disable.after" |
||
106 | */ |
||
107 | public function hookModuleDisableAfter() |
||
111 | |||
112 | /** |
||
113 | * Implements hook "module.install.after" |
||
114 | */ |
||
115 | public function hookModuleInstallAfter() |
||
119 | |||
120 | /** |
||
121 | * Implements hook "module.uninstall.after" |
||
122 | */ |
||
123 | public function hookModuleUninstallAfter() |
||
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 | * Returns PHPMailer instance |
||
184 | * @return \PHPMailer |
||
185 | * @throws DependencyException |
||
186 | */ |
||
187 | public function getMailer() |
||
197 | |||
198 | /** |
||
199 | * @param array $to |
||
200 | * @param string $subject |
||
201 | * @param string $message |
||
202 | * @param array $options |
||
203 | * @param mixed $result |
||
204 | */ |
||
205 | protected function setMailer($to, $subject, $message, $options, &$result) |
||
216 | |||
217 | } |
||
218 |