Class for parsing MIME messages
package |
Framework |
---|---|
subpackage |
Storage |
author |
Thomas Bruederli |
author |
Aleksander Machniak |
__construct($default_charset = null)
get_charset() : string
string
Characted set name
structure_part($part, $count, $parent = '') : object
object
rcube_message_part
decode_address_list(string $input, int $max = null, boolean $decode = true, string $fallback = null, boolean $addronly = false) : array
string
Input string
int
List only this number of addresses
boolean
Decode address strings
string
Fallback charset if none specified
boolean
Return flat array with e-mail addresses only
array
Indexed list of addresses
decode_header(string $input, string $fallback = null) : string
string
Header value
string
Fallback charset if none specified
string
Decoded string
decode_mime_string(string $input, string $fallback = null) : string
string
Header value
string
Fallback charset if none specified
string
Decoded string
decode(string $input, string $encoding = '7bit') : string
string
Input string
string
Part encoding
string
Decoded string
parse_headers($headers)
access |
private |
---|---|
parse_address_list($str, $decode = true, $fallback = null)
access |
private |
---|---|
explode_header_string(string $separator, string $str, bool $remove_comments = false) : array
string
String containing separator characters
string
Header string
bool
Enable to remove comments
array
Header items
unfold_flowed(string $text) : string
string
Raw body formatted as flowed text
string
Interpreted text with unwrapped lines and stuffed space removed
format_flowed(string $text, int $length = 72, string $charset = null) : string
string
Text to wrap
int
Length
string
Character encoding of $text
string
Wrapped text
wordwrap(string $string, int $width = 75, string $break = "\n", bool $cut = false, string $charset = null, bool $wrap_quoted = true) : string
The code is based on Zend_Text_MultiByte::wordWrap().
string
Text to wrap
int
Line width
string
Line separator
bool
Enable to cut word
string
Charset of $string
bool
When enabled quoted lines will not be wrapped
string
Text
file_content_type(string $path, string $name, string $failover = 'application/octet-stream', boolean $is_stream = false, boolean $skip_suffix = false) : string
author |
Till Klampaeckel |
---|---|
see | \http://de2.php.net/manual/en/ref.fileinfo.php \http://de2.php.net/mime_content_type |
string
Path to the file or file contents
string
File name (with suffix)
string
Mime type supplied for failover
boolean
Set to True if $path contains file contents
boolean
Set to True if the config/mimetypes.php mappig should be ignored
string
get_mime_extensions($mimetype = null) : array
array
List of extensions matching the given mimetype or a hash array with ext -> mimetype mappings if $mimetype is not given
image_content_type(string $data) : string
string
Binary file content
string
Detected mime-type or jpeg as fallback
default_charset :