1 | <?php |
||
17 | abstract class Swift |
||
|
|||
18 | { |
||
19 | const VERSION = '5.x'; |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | public static $initialized = false; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | public static $inits = array(); |
||
30 | |||
31 | /** |
||
32 | * Registers an initializer callable that will be called the first time |
||
33 | * a SwiftMailer class is autoloaded. |
||
34 | * |
||
35 | * This enables you to tweak the default configuration in a lazy way. |
||
36 | * |
||
37 | * @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class |
||
38 | */ |
||
39 | public static function init($callable) |
||
43 | |||
44 | /** |
||
45 | * Internal autoloader for spl_autoload_register(). |
||
46 | * |
||
47 | * @param string $class |
||
48 | */ |
||
49 | 63 | public static function autoload(string $class) |
|
72 | |||
73 | /** |
||
74 | * Configure autoloading using Swift Mailer. |
||
75 | * |
||
76 | * This is designed to play nicely with other autoloaders. |
||
77 | * |
||
78 | * @param mixed $callable A valid PHP callable that will be called when autoloading the first Swift class |
||
79 | */ |
||
80 | public static function registerAutoload($callable = null) |
||
88 | |||
89 | /** |
||
90 | * php-strtolower with static-cache |
||
91 | * |
||
92 | * @param $string |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | 353 | public static function strtolowerWithStaticCache(string $string): string |
|
108 | } |
||
109 |
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.