1 | <?php |
||
7 | abstract class SubscriptionSender |
||
8 | { |
||
9 | protected $mailer; |
||
10 | |||
11 | public function __construct(Mailer $mailer = null) |
||
18 | |||
19 | /** |
||
20 | * Get a valid message id for a certain $id and revision (or the current revision) |
||
21 | * |
||
22 | * @param string $id The id of the page (or media file) the message id should be for |
||
23 | * @param string $rev The revision of the page, set to the current revision of the page $id if not set |
||
24 | * |
||
25 | * @return string |
||
26 | */ |
||
27 | protected function getMessageID($id, $rev = null) |
||
43 | |||
44 | /** |
||
45 | * Helper function for sending a mail |
||
46 | * |
||
47 | * @param string $subscriber_mail The target mail address |
||
48 | * @param string $subject The lang id of the mail subject (without the |
||
49 | * prefix “mail_”) |
||
50 | * @param string $context The context of this mail, eg. page or namespace id |
||
51 | * @param string $template The name of the mail template |
||
52 | * @param array $trep Predefined parameters used to parse the |
||
53 | * template (in text format) |
||
54 | * @param array $hrep Predefined parameters used to parse the |
||
55 | * template (in HTML format), null to default to $trep |
||
56 | * @param array $headers Additional mail headers in the form 'name' => 'value' |
||
57 | * |
||
58 | * @return bool |
||
59 | * @author Adrian Lang <[email protected]> |
||
60 | * |
||
61 | */ |
||
62 | protected function send($subscriber_mail, $subject, $context, $template, $trep, $hrep = null, $headers = []) |
||
86 | } |
||
87 |