1 | <?php |
||
15 | class MailjetSendApiTransport implements \Swift_Transport |
||
16 | { |
||
17 | protected $client; |
||
18 | protected $dispatcher; |
||
19 | protected $forceDeliver; |
||
20 | protected $reportingEmail; |
||
21 | protected $started = true; |
||
22 | protected $templateIdGuesserManager; |
||
23 | |||
24 | /** |
||
25 | * @param Client $client |
||
26 | * @param \Swift_Events_EventDispatcher $dispatcher |
||
27 | 9 | * @param TemplateIdGuesserManager $templateIdGuesserManager |
|
28 | * @param null|string $reportingEmail |
||
29 | * @param bool $forceDeliver |
||
30 | */ |
||
31 | public function __construct( |
||
44 | 1 | ||
45 | /** |
||
46 | * Test if this Transport mechanism has started. |
||
47 | * |
||
48 | * @return bool |
||
49 | */ |
||
50 | 1 | public function isStarted() |
|
54 | |||
55 | /** |
||
56 | * Start this Transport mechanism. |
||
57 | */ |
||
58 | 1 | public function start() |
|
62 | |||
63 | /** |
||
64 | * Stop this Transport mechanism. |
||
65 | */ |
||
66 | public function stop() |
||
70 | |||
71 | /** |
||
72 | * Send the given Message. |
||
73 | * |
||
74 | 5 | * Recipient/sender data will be retrieved from the Message API. |
|
75 | * The return value is the number of recipients who were accepted for delivery. |
||
76 | 5 | * |
|
77 | * @param Swift_Mime_SimpleMessage $message |
||
78 | 5 | * @param string[] $failedRecipients An array of failures by-reference |
|
79 | 4 | * |
|
80 | 4 | * @return int |
|
81 | 1 | */ |
|
82 | public function send(Swift_Mime_SimpleMessage $message, &$failedRecipients = null) |
||
154 | |||
155 | /** |
||
156 | * Register a plugin in the Transport. |
||
157 | * |
||
158 | * @param Swift_Events_EventListener $plugin |
||
159 | */ |
||
160 | public function registerPlugin(Swift_Events_EventListener $plugin) |
||
164 | |||
165 | /** |
||
166 | * @return bool |
||
167 | */ |
||
168 | public function ping() |
||
172 | } |
||
173 |