Class for parsing MIME messages
| package |
Framework |
|---|---|
| subpackage |
Storage |
| author |
Aleksander Machniak alec@alec.pl |
__construct(array $params = array())
Sets up the object, initialise the variables, and splits and stores the header and body of the input.
arrayAn array of various parameters that determine various things: include_bodies - Whether to include the body in the returned object. decode_bodies - Whether to decode the bodies of the parts. (Transfer encoding) decode_headers - Whether to decode headers crlf - CRLF type to use (CRLF/LF/CR)
boundarySplit(string $input, string $boundary) : array
stringInput to parse
stringBoundary
arrayContains array of resulting mime parts
decode(string $input, boolean $convert = true) : object|boolean
stringThe input to decode
booleanConvert result to rcube_message_part structure
object|booleanDecoded results or False on failure
decodeHeader(string $input) : string
Probably not exactly conformant, but it does pass all the given examples (in RFC2047).
stringInput header value to decode
stringDecoded header value
do_decode(string $headers, string $body, string $default_ctype = 'text/plain') : object|boolean
stringHeader section
stringBody section
stringDefault content type
object|booleanDecoded results or False on error
parseHeaders(string $input) : array
stringHeaders to parse
arrayContains parsed headers
parseHeaderValue(string $input) : array
Eg. header comments in the wrong place will probably break it.
stringHeader value to parse
arrayContains parsed result
splitBodyHeader(string $input) : array
stringInput to split apart
arrayContains header and body section
structure_part(object $part, integer $count, string $parent = '') : object
| see | \rcube_mime_decode::decode() |
|---|
objectA message part struct
integerPart count
stringParent MIME ID
objectrcube_message_part
params : array
| var |
|---|
array