1 | <?php |
||
14 | class Swift_PdoSpool extends Swift_ConfigurableSpool |
||
15 | { |
||
16 | /** |
||
17 | * @var \PDO The database driver |
||
18 | */ |
||
19 | protected $pdo; |
||
20 | protected $table; |
||
21 | protected $pkey; |
||
22 | protected $messageField; |
||
23 | protected $timeField; |
||
24 | |||
25 | /** |
||
26 | * Creates a new PdoSpool |
||
27 | * |
||
28 | * @param \PDO $pdo The database driver |
||
29 | * @param string $table The table name |
||
30 | * @param string $pkey The primary key field |
||
31 | * @param string $messageField The field to add serialized message data |
||
32 | * @param string $timeField The integer field to store message timestamp |
||
33 | */ |
||
34 | 2 | public function __construct(\PDO $pdo, $table, $pkey, $messageField, $timeField) |
|
42 | |||
43 | 1 | private function checkBlank($value) |
|
51 | |||
52 | /** |
||
53 | * Tests if this Spool mechanism has started. |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | 1 | public function isStarted() |
|
61 | |||
62 | /** |
||
63 | * Starts this Spool mechanism. |
||
64 | */ |
||
65 | public function start() |
||
68 | |||
69 | /** |
||
70 | * Stops this Spool mechanism. |
||
71 | */ |
||
72 | public function stop() |
||
75 | |||
76 | /** |
||
77 | * Queues a message. |
||
78 | * |
||
79 | * @param Swift_Mime_SimpleMessage $message The message to store |
||
80 | * |
||
81 | * @throws Swift_IoException |
||
82 | * |
||
83 | * @return bool |
||
84 | */ |
||
85 | 1 | public function queueMessage(Swift_Mime_SimpleMessage $message) |
|
97 | |||
98 | /** |
||
99 | * Execute a recovery if for any reason a process is sending for too long. |
||
100 | * |
||
101 | * @param int $timeout in second Defaults is for very slow smtp responses |
||
102 | */ |
||
103 | 1 | public function recover($timeout = 900) |
|
114 | |||
115 | /** |
||
116 | * Sends messages using the given transport instance. |
||
117 | * |
||
118 | * @param Swift_Transport $transport A transport instance |
||
119 | * @param string[] $failedRecipients An array of failures by-reference |
||
120 | * |
||
121 | * @return int The number of sent e-mails |
||
122 | */ |
||
123 | 1 | public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) |
|
160 | } |
||
161 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.