@@ -4,6 +4,10 @@ discard block |
||
4 | 4 | |
5 | 5 | class HeaderDecoder { |
6 | 6 | public static $decodeWindows1252 = false; |
7 | + |
|
8 | + /** |
|
9 | + * @param string $string |
|
10 | + */ |
|
7 | 11 | public function decode($string) { |
8 | 12 | /* Take out any spaces between multiple encoded words. */ |
9 | 13 | $string = preg_replace ( '|\?=\s+=\?|', '?==?', $string ); |
@@ -62,6 +66,12 @@ discard block |
||
62 | 66 | |
63 | 67 | return $out . substr ( $string, $old_pos ); |
64 | 68 | } |
69 | + |
|
70 | + /** |
|
71 | + * @param string $str |
|
72 | + * @param string $orig |
|
73 | + * @param string $to |
|
74 | + */ |
|
65 | 75 | public static function convertCharset($str, $orig, $to) { |
66 | 76 | //@todo convert charset |
67 | 77 | return $str; |
@@ -23,10 +23,10 @@ discard block |
||
23 | 23 | } |
24 | 24 | /** |
25 | 25 | * |
26 | - * @param stream $stream |
|
26 | + * @param resource $stream |
|
27 | 27 | * @param boolean $fillHeaders (default to false) |
28 | 28 | * @param \Swift_Mime_MimeEntity $message (default to null) |
29 | - * @return Swift_Mime_MimeEntity|\Swift_Message |
|
29 | + * @return \Swift_Mime_MimeEntity |
|
30 | 30 | */ |
31 | 31 | public function parseStream($stream, $fillHeaders = false, \Swift_Mime_MimeEntity $message = null) { |
32 | 32 | $partHeaders = $this->extractHeaders ( $stream ); |
@@ -235,6 +235,10 @@ discard block |
||
235 | 235 | $entity->setBody ( $message ["body"], $message ["type"] ); |
236 | 236 | } |
237 | 237 | } |
238 | + |
|
239 | + /** |
|
240 | + * @return string |
|
241 | + */ |
|
238 | 242 | private function extractValueHeader($header) { |
239 | 243 | $pos = stripos ( $header, ';' ); |
240 | 244 | if ($pos !== false) { |