1 | <?php |
||
16 | class Swift_Mailer |
||
|
|||
17 | { |
||
18 | /** The Transport used to send messages */ |
||
19 | private $_transport; |
||
20 | |||
21 | /** |
||
22 | * Create a new Mailer using $transport for delivery. |
||
23 | * |
||
24 | * @param Swift_Transport $transport |
||
25 | */ |
||
26 | 11 | public function __construct(Swift_Transport $transport) |
|
30 | |||
31 | /** |
||
32 | * Create a new Mailer instance. |
||
33 | * |
||
34 | * @param Swift_Transport $transport |
||
35 | * |
||
36 | * @return self |
||
37 | */ |
||
38 | public static function newInstance(Swift_Transport $transport) |
||
42 | |||
43 | /** |
||
44 | * Create a new class instance of one of the message services. |
||
45 | * |
||
46 | * For example 'mimepart' would create a 'message.mimepart' instance |
||
47 | * |
||
48 | * @param string $service |
||
49 | * |
||
50 | * @return object |
||
51 | * |
||
52 | * @throws Swift_DependencyException |
||
53 | */ |
||
54 | public function createMessage($service = 'message') |
||
58 | |||
59 | /** |
||
60 | * Send the given Message like it would be sent in a mail client. |
||
61 | * |
||
62 | * All recipients (with the exception of Bcc) will be able to see the other |
||
63 | * recipients this message was sent to. |
||
64 | * |
||
65 | * Recipient/sender data will be retrieved from the Message object. |
||
66 | * |
||
67 | * The return value is the number of recipients who were accepted for |
||
68 | * delivery. |
||
69 | * |
||
70 | * @param Swift_Mime_Message $message |
||
71 | * @param array $failedRecipients An array of failures by-reference |
||
72 | * |
||
73 | * @return int The number of successful recipients. Can be 0 which indicates failure |
||
74 | */ |
||
75 | 10 | public function send(Swift_Mime_Message $message, &$failedRecipients = null) |
|
95 | |||
96 | /** |
||
97 | * Register a plugin using a known unique key (e.g. myPlugin). |
||
98 | * |
||
99 | * @param Swift_Events_EventListener $plugin |
||
100 | */ |
||
101 | 1 | public function registerPlugin(Swift_Events_EventListener $plugin) |
|
105 | |||
106 | /** |
||
107 | * The Transport used to send messages. |
||
108 | * |
||
109 | * @return Swift_Transport |
||
110 | */ |
||
111 | public function getTransport() |
||
115 | } |
||
116 |
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.