1 | <?php |
||
15 | class MailjetSendApiTransport implements \Swift_Transport |
||
16 | { |
||
17 | protected $client; |
||
18 | protected $dispatcher; |
||
19 | protected $started = true; |
||
20 | protected $templateIdGuesserManager; |
||
21 | |||
22 | /** |
||
23 | * @param Client $client |
||
24 | * @param \Swift_Events_EventDispatcher $dispatcher |
||
25 | * @param TemplateIdGuesserManager $templateIdGuesserManager |
||
26 | */ |
||
27 | 9 | public function __construct( |
|
36 | |||
37 | /** |
||
38 | * Test if this Transport mechanism has started. |
||
39 | * |
||
40 | * @return bool |
||
41 | */ |
||
42 | 1 | public function isStarted() |
|
46 | |||
47 | /** |
||
48 | * Start this Transport mechanism. |
||
49 | */ |
||
50 | 1 | public function start() |
|
54 | |||
55 | /** |
||
56 | * Stop this Transport mechanism. |
||
57 | */ |
||
58 | 1 | public function stop() |
|
62 | |||
63 | /** |
||
64 | * Send the given Message. |
||
65 | * |
||
66 | * Recipient/sender data will be retrieved from the Message API. |
||
67 | * The return value is the number of recipients who were accepted for delivery. |
||
68 | * |
||
69 | * @param Swift_Mime_Message $message |
||
70 | * @param string[] $failedRecipients An array of failures by-reference |
||
71 | * |
||
72 | * @return int |
||
73 | */ |
||
74 | 5 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
|
140 | |||
141 | /** |
||
142 | * Register a plugin in the Transport. |
||
143 | * |
||
144 | * @param Swift_Events_EventListener $plugin |
||
145 | */ |
||
146 | 1 | public function registerPlugin(Swift_Events_EventListener $plugin) |
|
150 | |||
151 | /** |
||
152 | * @return bool |
||
153 | */ |
||
154 | public function ping() |
||
158 | } |
||
159 |