Constants

HEADER_PARSE

HEADER_PARSE

Header formatting constants.

HEADER_STREAM

HEADER_STREAM

Properties

$_data

$_data : array

Internal data array.

Type

array

Methods

__clone()

__clone() 

setFullMsg()

setFullMsg(mixed  $msg) 

Set the full message property.

Parameters

mixed $msg

The full message text, as either a string or stream resource.

getFullMsg()

getFullMsg(boolean  $stream = false) : mixed

Returns the full message.

Parameters

boolean $stream

Return as a stream?

Returns

mixed —

The full text of the entire message.

setStructure()

setStructure(\Horde_Mime_Part  $structure) 

Set the message structure.

Parameters

\Horde_Mime_Part $structure

The base MIME part of the message.

getStructure()

getStructure() : \Horde_Mime_Part

Get the message structure.

Returns

\Horde_Mime_Part —

$structure The base MIME part of the message.

setHeaders()

setHeaders(string  $label, mixed  $data) 

Set a header entry.

Parameters

string $label

The search label.

mixed $data

Either a Horde_Mime_Headers object or the raw header text.

getHeaders()

getHeaders(string  $label, integer  $format) : mixed

Get a header entry.

Parameters

string $label

The search label.

integer $format

The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.

Returns

mixed —

See $format.

setHeaderText()

setHeaderText(string  $id, mixed  $text) 

Set a header text entry.

Parameters

string $id

The MIME ID.

mixed $text

The header text, as either a string or stream resource.

getHeaderText()

getHeaderText(string  $id, integer  $format) : mixed

Get a header text entry.

Parameters

string $id

The MIME ID.

integer $format

The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.

Returns

mixed —

See $format.

setMimeHeader()

setMimeHeader(string  $id, mixed  $text) 

Set a MIME header entry.

Parameters

string $id

The MIME ID.

mixed $text

The header text, as either a string or stream resource.

getMimeHeader()

getMimeHeader(string  $id, integer  $format) : mixed

Get a MIME header entry.

Parameters

string $id

The MIME ID.

integer $format

The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.

Returns

mixed —

See $format.

setBodyPart()

setBodyPart(string  $id, mixed  $text, string  $decode = null) 

Set a body part entry.

Parameters

string $id

The MIME ID.

mixed $text

The body part text, as either a string or stream resource.

string $decode

Either '8bit', 'binary', or null.

getBodyPart()

getBodyPart(string  $id, boolean  $stream = false) : mixed

Get a body part entry.

Parameters

string $id

The MIME ID.

boolean $stream

Return as a stream?

Returns

mixed —

The full text of the body part.

getBodyPartDecode()

getBodyPartDecode(string  $id) : string

Determines if/how a body part was MIME decoded on the server.

Parameters

string $id

The MIME ID.

Returns

string —

Either '8bit', 'binary', or null.

setBodyPartSize()

setBodyPartSize(string  $id, integer  $size) 

Set the body part size for a body part.

Parameters

string $id

The MIME ID.

integer $size

The size (in bytes).

getBodyPartSize()

getBodyPartSize(string  $id) : integer

Returns the body part size, if returned by the server.

Parameters

string $id

The MIME ID.

Returns

integer —

The body part size, in bytes.

setBodyText()

setBodyText(string  $id, mixed  $text) 

Set a body text entry.

Parameters

string $id

The MIME ID.

mixed $text

The body part text, as either a string or stream resource.

getBodyText()

getBodyText(string  $id, boolean  $stream = false) : mixed

Get a body text entry.

Parameters

string $id

The MIME ID.

boolean $stream

Return as a stream?

Returns

mixed —

The full text of the body text.

setEnvelope()

setEnvelope(array  $data) 

Set envelope data.

Parameters

array $data

The envelope data to pass to the Envelope object constructor, or an Envelope object.

setFlags()

setFlags(array  $flags) 

Set IMAP flags.

Parameters

array $flags

An array of IMAP flags.

getFlags()

getFlags() : array

Get IMAP flags.

Returns

array —

An array of IMAP flags (all flags in lowercase).

setImapDate()

setImapDate(mixed  $date) 

Set IMAP internal date.

Parameters

mixed $date

Either a Horde_Imap_Client_DateTime object or a date string.

getImapDate()

getImapDate() : \Horde_Imap_Client_DateTime

Get internal IMAP date.

Returns

\Horde_Imap_Client_DateTime

A date object.

setSize()

setSize(integer  $size) 

Set message size.

Parameters

integer $size

The size of the message, in bytes.

getSize()

getSize() : integer

Get message size.

Returns

integer —

The size of the message, in bytes.

setUid()

setUid(string  $uid) 

Set UID.

Parameters

string $uid

The message UID. Unlike IMAP, this UID does not have to be an integer.

getUid()

getUid() : integer

Get UID.

Returns

integer —

The message UID.

setSeq()

setSeq(integer  $seq) 

Set message sequence number.

Parameters

integer $seq

The message sequence number.

getSeq()

getSeq() : integer

Get message sequence number.

Returns

integer —

The message sequence number.

setModSeq()

setModSeq(integer  $modseq) 

Set the modified sequence value for the message.

Parameters

integer $modseq

The modseq value.

getModSeq()

getModSeq() : integer

Get the modified sequence value for the message.

Returns

integer —

The modseq value.

setDowngraded()

setDowngraded(boolean  $downgraded) 

Set the internationalized downgraded status for the message.

Parameters

boolean $downgraded

True if at least one message component has been downgraded.

isDowngraded()

isDowngraded() : boolean

Does the message contain internationalized downgraded data (i.e. it is a "surrogate" message)?

Returns

boolean —

True if at least one message components has been downgraded.

getRawData()

getRawData() : array

Return the internal representation of the data.

Returns

array —

The data array.

merge()

merge(\Horde_Imap_Client_Data_Fetch  $data) 

Merge a fetch object into this one.

Parameters

\Horde_Imap_Client_Data_Fetch $data

A fetch object.

exists()

exists(integer  $type) : boolean

Does this object containing cacheable data of the given type?

Parameters

integer $type

The type to query.

Returns

boolean —

True if the type is cacheable.

isDefault()

isDefault() : boolean

Does this object contain only default values for all fields?

Returns

boolean —

True if object contains default data.

_msgText()

_msgText(boolean  $stream, mixed  $data) : mixed

Return text representation of a field.

Parameters

boolean $stream

Return as a stream?

mixed $data

The field data (string or resource) or null if field does not exist.

Returns

mixed —

Requested text representation.

_getHeaders()

_getHeaders(string  $id, integer  $format, integer  $key) : mixed

Return representation of a header field.

Parameters

string $id

The header id.

integer $format

The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.

integer $key

The array key where the data is stored in the internal array.

Returns

mixed —

The data in the format specified by $format.

_setMixed()

_setMixed(mixed  $data) : mixed

Converts mixed input (string or resource) to the correct internal representation.

Parameters

mixed $data

Mixed data (string, resource, Horde_Stream object).

Returns

mixed —

The internal representation of that data.