1 | <?php |
||
17 | class DatabaseSpool extends \Swift_ConfigurableSpool { |
||
18 | /** |
||
19 | * @var EmailRepository |
||
20 | */ |
||
21 | private $repository; |
||
22 | |||
23 | private $parameters; |
||
24 | |||
25 | public function __construct(EmailRepository $repository, $parameters) |
||
30 | |||
31 | |||
32 | /** |
||
33 | * Starts this Spool mechanism. |
||
34 | */ |
||
35 | public function start() |
||
39 | |||
40 | /** |
||
41 | * Stops this Spool mechanism. |
||
42 | */ |
||
43 | public function stop() |
||
47 | |||
48 | /** |
||
49 | * Tests if this Spool mechanism has started. |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | public function isStarted() |
||
57 | |||
58 | /** |
||
59 | * Queues a message. |
||
60 | * |
||
61 | * @param Swift_Mime_Message $message The message to store |
||
62 | * |
||
63 | * @return bool Whether the operation has succeeded |
||
64 | */ |
||
65 | public function queueMessage(Swift_Mime_Message $message) |
||
89 | |||
90 | /** |
||
91 | * Sends messages using the given transport instance. |
||
92 | * |
||
93 | * @param Swift_Transport $transport A transport instance |
||
94 | * @param string[] $failedRecipients An array of failures by-reference |
||
95 | * |
||
96 | * @return int The number of sent emails |
||
97 | */ |
||
98 | public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) |
||
126 | } |
||
127 |