1175. Class

1175.1. Zend\Mime\Decode

1175.1.1. Methods

1175.1.1.1. splitMime

splitMime()

Explode MIME multipart string into separate parts

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

Parameters:
  • string – raw body of message
  • string – boundary as found in content-type
Return type:

array parts with content of each part, empty if no parts found

Throws :

ExceptionRuntimeException

1175.1.1.2. splitMessageStruct

splitMessageStruct()

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

Parameters:
  • string – raw message content
  • string – boundary as found in content-type
  • string – EOL string; defaults to {@link Zend_Mime::LINEEND}
Return type:

array|null parts as array(‘header’ => array(name => value), ‘body’ => content), null if no parts found

Throws :

ExceptionRuntimeException

1175.1.1.3. splitMessage

splitMessage()

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|Headers – raw message with header and optional content
  • Headers – output param, headers container
  • string – output param, content of message
  • string – EOL string; defaults to {@link Zend_Mime::LINEEND}
  • bool – enable strict mode for parsing message
Return type:

null

1175.1.1.4. splitContentType

splitContentType()

split a content type in its different parts

Parameters:
  • string – content-type
  • string – the wanted part, else an array with all parts is returned
Return type:

string|array wanted part or all parts as array(‘type’ => content-type, partname => value)

1175.1.1.5. splitHeaderField

splitHeaderField()

split a header field like content type in its different parts

Parameters:
  • string – header field
  • string – the wanted part, else an array with all parts is returned
  • string – key name for the first part
Return type:

string|array wanted part or all parts as array($firstName => firstPart, partname => value)

Throws :

ExceptionRuntimeException

1175.1.1.6. decodeQuotedPrintable

decodeQuotedPrintable()

decode a quoted printable encoded string

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

Parameters:string – encoded string
Return type:string decoded string