1 | <?php |
||
7 | abstract class SubscriptionSender |
||
8 | { |
||
9 | private $mailer; |
||
10 | |||
11 | public function __construct(Mailer $mailer = null) |
||
18 | |||
19 | |||
20 | /** |
||
21 | * Helper function for sending a mail |
||
22 | * |
||
23 | * @param string $subscriber_mail The target mail address |
||
24 | * @param string $subject The lang id of the mail subject (without the |
||
25 | * prefix “mail_”) |
||
26 | * @param string $context The context of this mail, eg. page or namespace id |
||
27 | * @param string $template The name of the mail template |
||
28 | * @param array $trep Predefined parameters used to parse the |
||
29 | * template (in text format) |
||
30 | * @param array $hrep Predefined parameters used to parse the |
||
31 | * template (in HTML format), null to default to $trep |
||
32 | * @param array $headers Additional mail headers in the form 'name' => 'value' |
||
33 | * |
||
34 | * @return bool |
||
35 | * @author Adrian Lang <[email protected]> |
||
36 | * |
||
37 | */ |
||
38 | protected function send($subscriber_mail, $subject, $context, $template, $trep, $hrep = null, $headers = []) |
||
62 | } |
||
63 |