1 | <?php |
||
16 | class Swift_Mime_HeaderEncoder_Base64HeaderEncoder extends Swift_Encoder_Base64Encoder implements Swift_Mime_HeaderEncoder |
||
|
|||
17 | { |
||
18 | /** |
||
19 | * Get the name of this encoding scheme. |
||
20 | * Returns the string 'B'. |
||
21 | * |
||
22 | * @return string |
||
23 | */ |
||
24 | 2 | public function getName() |
|
28 | |||
29 | /** |
||
30 | * Takes an unencoded string and produces a Base64 encoded string from it. |
||
31 | * |
||
32 | * If the charset is iso-2022-jp, it uses mb_encode_mimeheader instead of |
||
33 | * default encodeString, otherwise pass to the parent method. |
||
34 | * |
||
35 | * @param string $string string to encode |
||
36 | * @param int $firstLineOffset |
||
37 | * @param int $maxLineLength optional, 0 indicates the default of 76 bytes |
||
38 | * @param string $charset |
||
39 | * |
||
40 | * @return string |
||
41 | */ |
||
42 | 1 | public function encodeString(string $string, int $firstLineOffset = 0, int $maxLineLength = 0, string $charset = 'utf-8') |
|
75 | |||
76 | /** |
||
77 | * Returns maximum number of bytes that can fit in a line with given |
||
78 | * offset and maximum length if encoded with base64 |
||
79 | * |
||
80 | * @param int $firstLineOffset |
||
81 | * @param int $maxLineLength |
||
82 | * |
||
83 | * @return int |
||
84 | */ |
||
85 | private function maxChunkLength($firstLineOffset, $maxLineLength) |
||
89 | } |
||
90 |
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.