Static Public Member Functions

Zend_Mime_Decode Class Reference

Static Public Member Functions

static splitMime ($body, $boundary)
static splitMessageStruct ($message, $boundary, $EOL=Zend_Mime::LINEEND)
static splitMessage ($message, &$headers, &$body, $EOL=Zend_Mime::LINEEND)
static splitContentType ($type, $wantedPart=null)
static splitHeaderField ($field, $wantedPart=null, $firstName=0)
static decodeQuotedPrintable ($string)

Detailed Description

Definition at line 33 of file Decode.php.


Member Function Documentation

static decodeQuotedPrintable ( string ) [static]

decode a quoted printable encoded string

The charset of the returned string depends on your iconv settings.

Parameters:
stringencoded string
Returns:
string decoded string

Definition at line 240 of file Decode.php.

static splitContentType ( type,
wantedPart = null 
) [static]

split a content type in its different parts

Parameters:
string$typecontent-type
string$wantedPartthe wanted part, else an array with all parts is returned
Returns:
string|array wanted part or all parts as array('type' => content-type, partname => value)

Definition at line 176 of file Decode.php.

static splitHeaderField ( field,
wantedPart = null,
firstName = 0 
) [static]

split a header field like content type in its different parts

Parameters:
string$typeheader field
string$wantedPartthe wanted part, else an array with all parts is returned
string$firstNamekey name for the first part
Returns:
string|array wanted part or all parts as array($firstName => firstPart, partname => value)
Exceptions:
Zend_Exception

Definition at line 190 of file Decode.php.

static splitMessage ( message,
&$  headers,
&$  body,
EOL = Zend_Mime::LINEEND 
) [static]

split a message in header and body part, if no header or an invalid header is found $headers is empty

The charset of the returned headers depend on your iconv settings.

Parameters:
string$messageraw message with header and optional content
array$headersoutput param, array with headers as array(name => value)
string$bodyoutput param, content of message
string$EOLEOL string; defaults to Zend_Mime::LINEEND
Returns:
null

Definition at line 117 of file Decode.php.

static splitMessageStruct ( message,
boundary,
EOL = Zend_Mime::LINEEND 
) [static]

decodes a mime encoded String and returns a struct of parts with header and body

Parameters:
string$messageraw message content
string$boundaryboundary as found in content-type
string$EOLEOL string; defaults to Zend_Mime::LINEEND
Returns:
array|null parts as array('header' => array(name => value), 'body' => content), null if no parts found
Exceptions:
Zend_Exception

Definition at line 90 of file Decode.php.

static splitMime ( body,
boundary 
) [static]

Explode MIME multipart string into seperate parts

Parts consist of the header and the body of each MIME part.

Parameters:
string$bodyraw body of message
string$boundaryboundary as found in content-type
Returns:
array parts with content of each part, empty if no parts found
Exceptions:
Zend_Exception

Definition at line 45 of file Decode.php.


The documentation for this class was generated from the following file: