1 | <?php |
||
17 | abstract class Swift |
||
|
|||
18 | { |
||
19 | const VERSION = '5.x'; |
||
20 | |||
21 | public static $initialized = false; |
||
22 | public static $inits = array(); |
||
23 | |||
24 | /** |
||
25 | * Registers an initializer callable that will be called the first time |
||
26 | * a SwiftMailer class is autoloaded. |
||
27 | * |
||
28 | * This enables you to tweak the default configuration in a lazy way. |
||
29 | * |
||
30 | * @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class |
||
31 | */ |
||
32 | public static function init($callable) |
||
36 | |||
37 | /** |
||
38 | * Internal autoloader for spl_autoload_register(). |
||
39 | * |
||
40 | * @param string $class |
||
41 | */ |
||
42 | 62 | public static function autoload($class) |
|
64 | |||
65 | /** |
||
66 | * Configure autoloading using Swift Mailer. |
||
67 | * |
||
68 | * This is designed to play nicely with other autoloaders. |
||
69 | * |
||
70 | * @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class |
||
71 | */ |
||
72 | public static function registerAutoload($callable = null) |
||
79 | } |
||
80 |
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.