1 | <?php |
||
16 | class Swift_Transport_SpoolTransport implements Swift_Transport |
||
|
|||
17 | { |
||
18 | /** The spool instance */ |
||
19 | private $_spool; |
||
20 | |||
21 | /** The event dispatcher from the plugin API */ |
||
22 | private $_eventDispatcher; |
||
23 | |||
24 | /** |
||
25 | * Constructor. |
||
26 | */ |
||
27 | 1 | public function __construct(Swift_Events_EventDispatcher $eventDispatcher, Swift_Spool $spool = null) |
|
32 | |||
33 | /** |
||
34 | * Sets the spool object. |
||
35 | * |
||
36 | * @param Swift_Spool $spool |
||
37 | * |
||
38 | * @return Swift_Transport_SpoolTransport |
||
39 | */ |
||
40 | public function setSpool(Swift_Spool $spool) |
||
46 | |||
47 | /** |
||
48 | * Get the spool object. |
||
49 | * |
||
50 | * @return Swift_Spool |
||
51 | */ |
||
52 | public function getSpool() |
||
56 | |||
57 | /** |
||
58 | * Tests if this Transport mechanism has started. |
||
59 | * |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function isStarted() |
||
66 | |||
67 | /** |
||
68 | * Starts this Transport mechanism. |
||
69 | */ |
||
70 | public function start() |
||
73 | |||
74 | /** |
||
75 | * Stops this Transport mechanism. |
||
76 | */ |
||
77 | public function stop() |
||
80 | |||
81 | /** |
||
82 | * Check if this Transport mechanism is alive. |
||
83 | * |
||
84 | * If a Transport mechanism session is no longer functional, the method |
||
85 | * returns FALSE. It is the responsibility of the developer to handle this |
||
86 | * case and restart the Transport mechanism manually. |
||
87 | * |
||
88 | * @example |
||
89 | * |
||
90 | * if (!$transport->ping()) { |
||
91 | * $transport->stop(); |
||
92 | * $transport->start(); |
||
93 | * } |
||
94 | * |
||
95 | * The Transport mechanism will be started, if it is not already. |
||
96 | * |
||
97 | * It is undefined if the Transport mechanism attempts to restart as long as |
||
98 | * the return value reflects whether the mechanism is now functional. |
||
99 | * |
||
100 | * @return bool TRUE if the transport is alive |
||
101 | */ |
||
102 | public function ping() |
||
106 | |||
107 | /** |
||
108 | * Sends the given message. |
||
109 | * |
||
110 | * @param Swift_Mime_Message $message |
||
111 | * @param string[] $failedRecipients An array of failures by-reference |
||
112 | * |
||
113 | * @return int The number of sent e-mail's |
||
114 | */ |
||
115 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
||
135 | |||
136 | /** |
||
137 | * Register a plugin. |
||
138 | * |
||
139 | * @param Swift_Events_EventListener $plugin |
||
140 | */ |
||
141 | public function registerPlugin(Swift_Events_EventListener $plugin) |
||
145 | } |
||
146 |
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.