1 | <?php |
||
21 | class Main |
||
22 | { |
||
23 | |||
24 | /** |
||
25 | * Module class instance |
||
26 | * @var \gplcart\core\Module $module |
||
27 | */ |
||
28 | protected $module; |
||
29 | |||
30 | /** |
||
31 | * Library class instance |
||
32 | * @var \gplcart\core\Library $library |
||
33 | */ |
||
34 | protected $library; |
||
35 | |||
36 | /** |
||
37 | * @param Module $module |
||
38 | * @param Library $library |
||
39 | */ |
||
40 | public function __construct(Module $module, Library $library) |
||
45 | |||
46 | /** |
||
47 | * Implements hook "library.list" |
||
48 | * @param array $libraries |
||
49 | */ |
||
50 | public function hookLibraryList(array &$libraries) |
||
63 | |||
64 | /** |
||
65 | * Implements hook "route.list" |
||
66 | * @param array $routes |
||
67 | */ |
||
68 | public function hookRouteList(array &$routes) |
||
77 | |||
78 | /** |
||
79 | * Implements hook "mail.send" |
||
80 | * @param array $to |
||
81 | * @param string $subject |
||
82 | * @param string $message |
||
83 | * @param array $options |
||
84 | * @param mixed $result |
||
85 | */ |
||
86 | public function hookMailSend($to, $subject, $message, $options, &$result) |
||
90 | |||
91 | /** |
||
92 | * Send an E-mail |
||
93 | * @param array $to |
||
94 | * @param string $subject |
||
95 | * @param string $message |
||
96 | * @param array $options |
||
97 | * @param array $settings |
||
98 | * @return boolean|string |
||
99 | */ |
||
100 | public function send($to, $subject, $message, $options, $settings) |
||
144 | |||
145 | /** |
||
146 | * Returns PHPMailer instance |
||
147 | * @return PHPMailer |
||
148 | * @throws LogicException |
||
149 | */ |
||
150 | public function getMailer() |
||
160 | |||
161 | /** |
||
162 | * @param array $to |
||
163 | * @param string $subject |
||
164 | * @param string $message |
||
165 | * @param array $options |
||
166 | * @param mixed $result |
||
167 | */ |
||
168 | protected function setMailer($to, $subject, $message, $options, &$result) |
||
179 | |||
180 | } |
||
181 |