1 | <?php |
||
20 | abstract class SwiftAbstract |
||
21 | { |
||
22 | /** |
||
23 | * The configuration details for sending the email |
||
24 | * @var array |
||
25 | */ |
||
26 | protected $config = array(); |
||
27 | |||
28 | /** |
||
29 | * The version of Swiftmailer we're using |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $version; |
||
33 | |||
34 | /** |
||
35 | * The instance of Swiftmailer |
||
36 | * @var \Swift_Mailer |
||
37 | */ |
||
38 | protected $mailer; |
||
39 | |||
40 | /** |
||
41 | * Returns the version of Swiftmailer we're using |
||
42 | * @return string |
||
43 | */ |
||
44 | public function getVersion() |
||
48 | |||
49 | /** |
||
50 | * Returns the mailer object |
||
51 | * @return Swift_Mailer |
||
52 | */ |
||
53 | abstract public function getMailer(); |
||
54 | |||
55 | /** |
||
56 | * Abstract for creating the message object |
||
57 | * @param array $to |
||
58 | * @param string $from_email |
||
59 | * @param string $from_name |
||
60 | * @param string $subject |
||
61 | * @param string $message_body |
||
62 | * @param array $attachments |
||
63 | * @param string $mail_type |
||
64 | */ |
||
65 | abstract public function getMessage(array $to, $from_email, $from_name, $subject, $message_body, array $attachments, $mail_type='html'); |
||
66 | |||
67 | /** |
||
68 | * Wrapper to send the message |
||
69 | * @param object $message |
||
70 | */ |
||
71 | abstract public function send($message, $extra = null); |
||
72 | } |