1 | <?php |
||
16 | class Swift_MemorySpool implements Swift_Spool |
||
|
|||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $messages = array(); |
||
22 | |||
23 | /** |
||
24 | * @var int |
||
25 | */ |
||
26 | private $flushRetries = 3; |
||
27 | |||
28 | /** |
||
29 | * Tests if this Transport mechanism has started. |
||
30 | * |
||
31 | * @return bool |
||
32 | */ |
||
33 | public function isStarted() |
||
34 | { |
||
35 | return true; |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Starts this Transport mechanism. |
||
40 | */ |
||
41 | public function start() |
||
44 | |||
45 | /** |
||
46 | * Stops this Transport mechanism. |
||
47 | */ |
||
48 | public function stop() |
||
51 | |||
52 | /** |
||
53 | * @param int $retries |
||
54 | */ |
||
55 | public function setFlushRetries($retries) |
||
59 | |||
60 | /** |
||
61 | * Stores a message in the queue. |
||
62 | * |
||
63 | * @param Swift_Mime_Message $message The message to store |
||
64 | * |
||
65 | * @return bool Whether the operation has succeeded |
||
66 | */ |
||
67 | 2 | public function queueMessage(Swift_Mime_Message $message) |
|
68 | { |
||
69 | //clone the message to make sure it is not changed while in the queue |
||
70 | 2 | $this->messages[] = clone $message; |
|
71 | |||
72 | 2 | return true; |
|
73 | } |
||
74 | |||
75 | /** |
||
76 | * Sends messages using the given transport instance. |
||
77 | * |
||
78 | * @param Swift_Transport $transport A transport instance |
||
79 | * @param string[] $failedRecipients An array of failures by-reference |
||
80 | * |
||
81 | * @return int The number of sent emails |
||
82 | */ |
||
83 | 2 | public function flushQueue(Swift_Transport $transport, &$failedRecipients = null) |
|
116 | } |
||
117 |
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.