1 | <?php |
||
17 | class Swift_FileSpool extends Swift_ConfigurableSpool |
||
|
|||
18 | { |
||
19 | /** The spool directory */ |
||
20 | private $_path; |
||
21 | |||
22 | /** |
||
23 | * File WriteRetry Limit. |
||
24 | * |
||
25 | * @var int |
||
26 | */ |
||
27 | private $_retryLimit = 10; |
||
28 | |||
29 | /** |
||
30 | * Create a new FileSpool. |
||
31 | * |
||
32 | * @param string $path |
||
33 | * |
||
34 | * @throws Swift_IoException |
||
35 | */ |
||
36 | public function __construct($path) |
||
51 | |||
52 | /** |
||
53 | * Tests if this Spool mechanism has started. |
||
54 | * |
||
55 | * @return bool |
||
56 | */ |
||
57 | 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 | * Allow to manage the enqueuing retry limit. |
||
78 | * |
||
79 | * Default, is ten and allows over 64^20 different fileNames |
||
80 | * |
||
81 | * @param int $limit |
||
82 | */ |
||
83 | public function setRetryLimit($limit) |
||
87 | |||
88 | /** |
||
89 | * Queues a message. |
||
90 | * |
||
91 | * @param Swift_Mime_Message $message The message to store |
||
92 | * |
||
93 | * @throws Swift_IoException |
||
94 | * |
||
95 | * @return bool |
||
96 | */ |
||
97 | public function queueMessage(Swift_Mime_Message $message) |
||
118 | |||
119 | /** |
||
120 | * Execute a recovery if for any reason a process is sending for too long. |
||
121 | * |
||
122 | * @param int $timeout in second Defaults is for very slow smtp responses |
||
123 | */ |
||
124 | public function recover($timeout = 900) |
||
137 | |||
138 | /** |
||
139 | * Sends messages using the given transport instance. |
||
140 | * |
||
141 | * @param Swift_Transport $transport A transport instance |
||
142 | * @param string[] $failedRecipients An array of failures by-reference |
||
143 | * |
||
144 | * @return int The number of sent e-mail's |
||
145 | */ |
||
146 | public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) |
||
194 | |||
195 | /** |
||
196 | * Returns a random string needed to generate a fileName for the queue. |
||
197 | * |
||
198 | * @param int|null $count <strong>null</strong> use only "uniqid()"<br /> |
||
199 | * <strong>int</strong> use "random_int()" with a fixed- / fs-safe string |
||
200 | * |
||
201 | * @return string |
||
202 | */ |
||
203 | protected function getRandomString($count = null) |
||
219 | } |
||
220 |
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.