Mime/Decode.php
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Mime
- Version
- $Id$
\Zend_Mime_Decode
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Methods
decodeQuotedPrintable( $string) : string
decode a quoted printable encoded string
Name | Type | Description |
---|---|---|
$string |
Type | Description |
---|---|
string | decoded string |
splitContentType(string $type, string $wantedPart = null) : string | array
split a content type in its different parts
Name | Type | Description |
---|---|---|
$type | string | content-type |
$wantedPart | string | the wanted part, else an array with all parts is returned |
Type | Description |
---|---|
string | array | wanted part or all parts as array('type' => content-type, partname => value) |
splitHeaderField( $field, string $wantedPart = null, string $firstName = 0) : string | array
split a header field like content type in its different parts
Name | Type | Description |
---|---|---|
$field | ||
$wantedPart | string | the wanted part, else an array with all parts is returned |
$firstName | string | key name for the first part |
Type | Description |
---|---|
string | array | wanted part or all parts as array($firstName => firstPart, partname => value) |
Exception | Description |
---|---|
\Zend_Exception |
splitMessage(string $message, array $headers, string $body, string $EOL = \Zend_Mime::LINEEND) : null
split a message in header and body part, if no header or an invalid header is found $headers is empty
Name | Type | Description |
---|---|---|
$message | string | raw message with header and optional content |
$headers | array | output param, array with headers as array(name => value) |
$body | string | output param, content of message |
$EOL | string | EOL string; defaults to {@link Zend_Mime::LINEEND} |
Type | Description |
---|---|
null |
splitMessageStruct(string $message, string $boundary, string $EOL = \Zend_Mime::LINEEND) : array | null
decodes a mime encoded String and returns a struct of parts with header and body
Name | Type | Description |
---|---|---|
$message | string | raw message content |
$boundary | string | boundary as found in content-type |
$EOL | string | EOL string; defaults to {@link Zend_Mime::LINEEND} |
Type | Description |
---|---|
array | null | parts as array('header' => array(name => value), 'body' => content), null if no parts found |
Exception | Description |
---|---|
\Zend_Exception |
splitMime(string $body, string $boundary) : array
Explode MIME multipart string into seperate parts
Name | Type | Description |
---|---|---|
$body | string | raw body of message |
$boundary | string | boundary as found in content-type |
Type | Description |
---|---|
array | parts with content of each part, empty if no parts found |
Exception | Description |
---|---|
\Zend_Exception |