1 | <?php |
||
16 | class Swift_Preferences |
||
|
|||
17 | { |
||
18 | /** Singleton instance */ |
||
19 | private static $_instance; |
||
20 | |||
21 | /** Constructor not to be used */ |
||
22 | private function __construct() |
||
25 | |||
26 | /** |
||
27 | * Gets the instance of Preferences. |
||
28 | * |
||
29 | * @return self |
||
30 | */ |
||
31 | 123 | public static function getInstance() |
|
39 | |||
40 | /** |
||
41 | * Set the default charset used. |
||
42 | * |
||
43 | * @param string $charset |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | 115 | public function setCharset($charset) |
|
55 | |||
56 | /** |
||
57 | * Set the directory where temporary files can be saved. |
||
58 | * |
||
59 | * @param string $dir |
||
60 | * |
||
61 | * @return $this |
||
62 | */ |
||
63 | public function setTempDir($dir) |
||
71 | |||
72 | /** |
||
73 | * Set the type of cache to use (i.e. "disk" or "array"). |
||
74 | * |
||
75 | * @param string $type |
||
76 | * |
||
77 | * @return $this |
||
78 | */ |
||
79 | public function setCacheType($type) |
||
87 | |||
88 | /** |
||
89 | * Set the QuotedPrintable dot escaper preference. |
||
90 | * |
||
91 | * @param bool $dotEscape |
||
92 | * |
||
93 | * @return $this |
||
94 | */ |
||
95 | 8 | public function setQPDotEscape($dotEscape) |
|
107 | } |
||
108 |
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.