API Documentation

Mime/Decode.php

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-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Mime  
version
$Id: Decode.php 23984 2011-05-03 19:35:48Z ralph $  

\Zend_Mime_Decode

category
Zend  
copyright
Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)  
license
New BSD License  
package
Zend_Mime  

Methods

methodpublicdecodeQuotedPrintable( string $string ) : string
static

decode a quoted printable encoded string

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

Parameters
Name Type Description
$string string encoded string
Returns
Type Description
string decoded string
methodpublicsplitContentType( string $type, string $wantedPart = null ) : string|array
static

split a content type in its different parts

Parameters
Name Type Description
$type string

content-type

$wantedPart string the wanted part, else an array with all parts is returned
Returns
Type Description
stringarray wanted 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
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
Returns
Type Description
stringarray wanted part or all parts as array($firstName => firstPart, partname => value)
Throws
Exception Description
\Zend_Exception
methodpublicsplitMessage( string $message, array $headers, string $body, string $EOL = Zend_Mime ) : 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
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}

Returns
Type Description
null
methodpublicsplitMessageStruct( string $message, string $boundary, string $EOL = Zend_Mime ) : array|null
static

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

Parameters
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}

Returns
Type Description
arraynull parts as array('header' => array(name => value), 'body' => content), null if no parts found
Throws
Exception Description
\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
Name Type Description
$body string raw body of message
$boundary string

boundary as found in content-type

Returns
Type Description
array parts with content of each part, empty if no parts found
Throws
Exception Description
\Zend_Exception
Documentation was generated by DocBlox 0.13.3.