Mime/Decode.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
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

Package: Zend_Mime
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Methods

methodpublicdecodeQuotedPrintable( $string) : string
static

decode a quoted printable encoded string

The charset of the returned string depends on your iconv settings.
Parameters
NameTypeDescription
$string
Returns
TypeDescription
stringdecoded string
methodpublicsplitContentType(string $type, string $wantedPart = null) : string | array
static

split a content type in its different parts

Parameters
NameTypeDescription
$typestring

content-type

$wantedPartstring

the wanted part, else an array with all parts is returned

Returns
TypeDescription
string | arraywanted part or all parts as array('type' => content-type, partname => value)
methodpublicsplitHeaderField( $field, string $wantedPart = null, string $firstName = 0) : string | array
static

split a header field like content type in its different parts

Parameters
NameTypeDescription
$field
$wantedPartstring

the wanted part, else an array with all parts is returned

$firstNamestring

key name for the first part

Returns
TypeDescription
string | arraywanted part or all parts as array($firstName => firstPart, partname => value)
Throws
ExceptionDescription
\Zend_Exception
methodpublicsplitMessage(string $message, array $headers, string $body, string $EOL = \Zend_Mime::LINEEND) : null
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
NameTypeDescription
$messagestring

raw message with header and optional content

$headersarray

output param, array with headers as array(name => value)

$bodystring

output param, content of message

$EOLstring

EOL string; defaults to {@link Zend_Mime::LINEEND}

Returns
TypeDescription
null
methodpublicsplitMessageStruct(string $message, string $boundary, string $EOL = \Zend_Mime::LINEEND) : array | null
static

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

Parameters
NameTypeDescription
$messagestring

raw message content

$boundarystring

boundary as found in content-type

$EOLstring

EOL string; defaults to {@link Zend_Mime::LINEEND}

Returns
TypeDescription
array | nullparts as array('header' => array(name => value), 'body' => content), null if no parts found
Throws
ExceptionDescription
\Zend_Exception
methodpublicsplitMime(string $body, string $boundary) : array
static

Explode MIME multipart string into seperate parts

Parts consist of the header and the body of each MIME part.
Parameters
NameTypeDescription
$bodystring

raw body of message

$boundarystring

boundary as found in content-type

Returns
TypeDescription
arrayparts with content of each part, empty if no parts found
Throws
ExceptionDescription
\Zend_Exception
Documentation was generated by phpDocumentor 2.2.0 .