Class representing a MIME part.

 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

Exceptions

\Zend\Mime\Exception\InvalidArgumentException

Get boundary

getBoundary() : string

Returns

string

Get charset

getCharset() : string

Returns

string

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

getContent(string $EOL) : string

Parameters

$EOL

string

Returns

string

Get description

getDescription() : string

Returns

string

Get disposition

getDisposition() : string

Returns

string

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

getEncodedStream(string $EOL) : resource

very useful for large file attachments.

Parameters

$EOL

string

Exceptions

\Zend\Mime\Exception\RuntimeException if not a stream or unable to append filter

Returns

resource

Get encoding

getEncoding() : string

Returns

string

Get filename

getFileName() : string

Returns

string

Get Filters

getFilters() : array

Returns

array

Return the headers for this part as a string

getHeaders(string $EOL) : String

Parameters

$EOL

string

Returns

String

Create and return the array of headers for this MIME part

getHeadersArray(string $EOL) : array

access public

Parameters

$EOL

string

Returns

array

Get id

getId() : string

Returns

string

Get isStream

getIsStream() : bool

Returns

bool

Get language

getLanguage() : string

Returns

string

Get location

getLocation() : string

Returns

string

Get the RAW unencoded content from this part

getRawContent() : string

Returns

string

Get type

getType() : string

Returns

string

check if this part can be read as a stream.

isStream() : bool

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

Returns

bool

Set boundary

setBoundary(string $boundary) : \Zend\Mime\self

Parameters

$boundary

string

Returns

\Zend\Mime\self

Set charset

setCharset($charset) : \Zend\Mime\self

Parameters

$charset

Returns

\Zend\Mime\self

Set content

setContent(mixed $content) : \Zend\Mime\self

Parameters

$content

mixed

String or Stream containing the content

Exceptions

\Zend\Mime\Exception\InvalidArgumentException

Returns

\Zend\Mime\self

Set description

setDescription(string $description) : \Zend\Mime\self

Parameters

$description

string

Returns

\Zend\Mime\self

Set disposition

setDisposition(string $disposition) : \Zend\Mime\self

Parameters

$disposition

string

Returns

\Zend\Mime\self

Set encoding

setEncoding(string $encoding) : \Zend\Mime\self

Parameters

$encoding

string

Returns

\Zend\Mime\self

Set filename

setFileName(string $fileName) : \Zend\Mime\self

Parameters

$fileName

string

Returns

\Zend\Mime\self

Set filters

setFilters(array $filters) : \Zend\Mime\self

Parameters

$filters

array

Returns

\Zend\Mime\self

Set id

setId(string $id) : \Zend\Mime\self

Parameters

$id

string

Returns

\Zend\Mime\self

Set isStream

setIsStream(bool $isStream) : \Zend\Mime\self

Parameters

$isStream

bool

Returns

\Zend\Mime\self

Set language

setLanguage(string $language) : \Zend\Mime\self

Parameters

$language

string

Returns

\Zend\Mime\self

Set location

setLocation(string $location) : \Zend\Mime\self

Parameters

$location

string

Returns

\Zend\Mime\self

Set type

setType(string $type) : \Zend\Mime\self

Parameters

$type

string

Returns

\Zend\Mime\self

 Properties

 

$boundary

$boundary 

 

$charset

$charset 

 

$description

$description 

 

$disposition

$disposition 

 

$encoding

$encoding 

 

$filename

$filename 

 

$id

$id 

 

$language

$language 

 

$location

$location 

 

$type

$type 

 

$content

$content 

 

$filters

$filters 

 

$isStream

$isStream