Zend Framework  1.12
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Zend_Mime_Part Class Reference

Public Member Functions

 __construct ($content)
 create a new Mime Part.
 
 isStream ()
 check if this part can be read as a stream.
 
 getEncodedStream ()
 if this was created with a stream, return a filtered stream for reading the content.
 
 getContent ($EOL=Zend_Mime::LINEEND)
 Get the Content of the current Mime Part in the given encoding.
 
 getRawContent ()
 Get the RAW unencoded content from this part.
 
 getHeadersArray ($EOL=Zend_Mime::LINEEND)
 Create and return the array of headers for this MIME part.
 
 getHeaders ($EOL=Zend_Mime::LINEEND)
 Return the headers for this part as a string.
 

Public Attributes

 $type = Zend_Mime::TYPE_OCTETSTREAM
 
 $encoding = Zend_Mime::ENCODING_8BIT
 
 $id
 
 $disposition
 
 $filename
 
 $description
 
 $charset
 
 $boundary
 
 $location
 
 $language
 

Protected Attributes

 $_content
 
 $_isStream = false
 

Constructor & Destructor Documentation

__construct (   $content)

create a new Mime Part.

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

Parameters
mixed$contentString or Stream containing the content

Member Function Documentation

getContent (   $EOL = Zend_Mime::LINEEND)

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

Returns
String
getEncodedStream ( )

if this was created with a stream, return a filtered stream for reading the content.

very useful for large file attachments.

Returns
stream
Exceptions
Zend_Mime_Exceptionif not a stream or unable to append filter
getHeaders (   $EOL = Zend_Mime::LINEEND)

Return the headers for this part as a string.

Returns
String
getHeadersArray (   $EOL = Zend_Mime::LINEEND)

Create and return the array of headers for this MIME part.

public

Returns
array
getRawContent ( )

Get the RAW unencoded content from this part.

Returns
string
isStream ( )

check if this part can be read as a stream.

Todo:

setters/getters

error checking for setting $type

error checking for setting $encoding

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

Returns
bool

Member Data Documentation

$_content
protected
$_isStream = false
protected
$boundary
$charset
$description
$disposition
$filename
$id
$language
$location