Class representing a MIME part.

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

 Methods

create a new Mime Part.

__construct(mixed $content) 

The (unencoded) content of the Part as passed as a string or stream

Parameters

$content

mixed

String or Stream containing the content

Get the Content of the current Mime Part in the given encoding.

getContent(string $EOL = \Zend_Mime::LINEEND) : string

Parameters

$EOL

string

Line end; defaults to {@link Zend_Mime::LINEEND}

Exceptions

\Zend_Mime_Exception

Returns

string

if this was created with a stream, return a filtered stream for reading the content. very useful for large file attachments.

getEncodedStream() : mixed

Exceptions

\Zend_Mime_Exception if not a stream or unable to append filter

Returns

mixedStream

Return the headers for this part as a string

getHeaders(string $EOL = \Zend_Mime::LINEEND) : string

Parameters

$EOL

string

Line end; defaults to {@link Zend_Mime::LINEEND}

Returns

string

Create and return the array of headers for this MIME part

getHeadersArray(string $EOL = \Zend_Mime::LINEEND) : array

Parameters

$EOL

string

Line end; defaults to {@link Zend_Mime::LINEEND}

Returns

array

Get the RAW unencoded content from this part

getRawContent() : string

Returns

string

check if this part can be read as a stream.

isStream() : boolean

if true, getEncodedStream can be called, otherwise only getContent can be used to fetch the encoded content of the part

Returns

boolean

 Properties

 

Boundary

$boundary : string

Default

 

Character set

$charset : string

Default

 

Description

$description : string

Default

 

Disposition

$disposition : string

Default

 

Encoding

$encoding : string

Default

\Zend_Mime::ENCODING_8BIT
 

Filename

$filename : string

Default

 

ID

$id : string

Default

 

Language

$language : string

Default

 

Location

$location : string

Default

 

Type

$type : string

Default

\Zend_Mime::TYPE_OCTETSTREAM
 

Content

$_content : mixed

Default

 

$_isStream

$_isStream : boolean

Default

false