Zend Framework  1.12
Static Public Member Functions | List of all members
Zend_Mime_Decode Class Reference

Static Public Member Functions

static splitMime ($body, $boundary)
 Explode MIME multipart string into seperate parts.
 
static splitMessageStruct ($message, $boundary, $EOL=Zend_Mime::LINEEND)
 decodes a mime encoded String and returns a struct of parts with header and body
 
static splitMessage ($message, &$headers, &$body, $EOL=Zend_Mime::LINEEND)
 split a message in header and body part, if no header or an invalid header is found $headers is empty
 
static splitContentType ($type, $wantedPart=null)
 split a content type in its different parts
 
static splitHeaderField ($field, $wantedPart=null, $firstName=0)
 split a header field like content type in its different parts
 
static decodeQuotedPrintable ($string)
 decode a quoted printable encoded string
 

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
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)
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
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
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
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