1 | <?php |
||
16 | class Swift_Transport_NullTransport implements Swift_Transport |
||
|
|||
17 | { |
||
18 | /** The event dispatcher from the plugin API */ |
||
19 | private $_eventDispatcher; |
||
20 | |||
21 | /** |
||
22 | * Constructor. |
||
23 | * |
||
24 | * @param Swift_Events_EventDispatcher $eventDispatcher |
||
25 | */ |
||
26 | 1 | public function __construct(Swift_Events_EventDispatcher $eventDispatcher) |
|
30 | |||
31 | /** |
||
32 | * Tests if this Transport mechanism has started. |
||
33 | * |
||
34 | * @return bool |
||
35 | */ |
||
36 | public function isStarted() |
||
40 | |||
41 | /** |
||
42 | * Starts this Transport mechanism. |
||
43 | */ |
||
44 | public function start() |
||
47 | |||
48 | /** |
||
49 | * Stops this Transport mechanism. |
||
50 | */ |
||
51 | public function stop() |
||
54 | |||
55 | /** |
||
56 | * Check if this Transport mechanism is alive. |
||
57 | * |
||
58 | * If a Transport mechanism session is no longer functional, the method |
||
59 | * returns FALSE. It is the responsibility of the developer to handle this |
||
60 | * case and restart the Transport mechanism manually. |
||
61 | * |
||
62 | * @example |
||
63 | * |
||
64 | * if (!$transport->ping()) { |
||
65 | * $transport->stop(); |
||
66 | * $transport->start(); |
||
67 | * } |
||
68 | * |
||
69 | * The Transport mechanism will be started, if it is not already. |
||
70 | * |
||
71 | * It is undefined if the Transport mechanism attempts to restart as long as |
||
72 | * the return value reflects whether the mechanism is now functional. |
||
73 | * |
||
74 | * @return bool TRUE if the transport is alive |
||
75 | */ |
||
76 | public function ping() |
||
80 | |||
81 | /** |
||
82 | * Sends the given message. |
||
83 | * |
||
84 | * @param Swift_Mime_Message $message |
||
85 | * @param string[] $failedRecipients An array of failures by-reference |
||
86 | * |
||
87 | * @return int The number of sent emails |
||
88 | */ |
||
89 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
||
113 | |||
114 | /** |
||
115 | * Register a plugin. |
||
116 | * |
||
117 | * @param Swift_Events_EventListener $plugin |
||
118 | */ |
||
119 | public function registerPlugin(Swift_Events_EventListener $plugin) |
||
123 | } |
||
124 |
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.