Horde_Imap_Client_Data_Fetch
in package
Object containing data returned by the Horde_Imap_Client_Base#fetch() command.
Tags
Table of Contents
- HEADER_PARSE = 1
- Header formatting constants.
- HEADER_STREAM = 2
- $_data : array<string|int, mixed>
- Internal data array.
- __clone() : mixed
- exists() : bool
- Does this object containing cacheable data of the given type?
- getBodyPart() : mixed
- Get a body part entry.
- getBodyPartDecode() : string
- Determines if/how a body part was MIME decoded on the server.
- getBodyPartSize() : int
- Returns the body part size, if returned by the server.
- getBodyText() : mixed
- Get a body text entry.
- getEnvelope() : Horde_Imap_Client_Data_Envelope
- Get envelope data.
- getFlags() : array<string|int, mixed>
- Get IMAP flags.
- getFullMsg() : mixed
- Returns the full message.
- getHeaders() : mixed
- Get a header entry.
- getHeaderText() : mixed
- Get a header text entry.
- getImapDate() : Horde_Imap_Client_DateTime
- Get internal IMAP date.
- getMimeHeader() : mixed
- Get a MIME header entry.
- getModSeq() : int
- Get the modified sequence value for the message.
- getRawData() : array<string|int, mixed>
- Return the internal representation of the data.
- getSeq() : int
- Get message sequence number.
- getSize() : int
- Get message size.
- getStructure() : Horde_Mime_Part
- Get the message structure.
- getUid() : int
- Get UID.
- isDefault() : bool
- Does this object contain only default values for all fields?
- isDowngraded() : bool
- Does the message contain internationalized downgraded data (i.e. it is a "surrogate" message)?
- merge() : mixed
- Merge a fetch object into this one.
- setBodyPart() : mixed
- Set a body part entry.
- setBodyPartSize() : mixed
- Set the body part size for a body part.
- setBodyText() : mixed
- Set a body text entry.
- setDowngraded() : mixed
- Set the internationalized downgraded status for the message.
- setEnvelope() : mixed
- Set envelope data.
- setFlags() : mixed
- Set IMAP flags.
- setFullMsg() : mixed
- Set the full message property.
- setHeaders() : mixed
- Set a header entry.
- setHeaderText() : mixed
- Set a header text entry.
- setImapDate() : mixed
- Set IMAP internal date.
- setMimeHeader() : mixed
- Set a MIME header entry.
- setModSeq() : mixed
- Set the modified sequence value for the message.
- setSeq() : mixed
- Set message sequence number.
- setSize() : mixed
- Set message size.
- setStructure() : mixed
- Set the message structure.
- setUid() : mixed
- Set UID.
- _getHeaders() : mixed
- Return representation of a header field.
- _msgText() : mixed
- Return text representation of a field.
- _setMixed() : mixed
- Converts mixed input (string or resource) to the correct internal representation.
Constants
HEADER_PARSE
Header formatting constants.
public
mixed
HEADER_PARSE
= 1
HEADER_STREAM
public
mixed
HEADER_STREAM
= 2
Properties
$_data
Internal data array.
protected
array<string|int, mixed>
$_data
= array()
Methods
__clone()
public
__clone() : mixed
Return values
mixed —exists()
Does this object containing cacheable data of the given type?
public
exists(int $type) : bool
Parameters
- $type : int
-
The type to query.
Return values
bool —True if the type is cacheable.
getBodyPart()
Get a body part entry.
public
getBodyPart(string $id[, bool $stream = false ]) : mixed
Parameters
- $id : string
-
The MIME ID.
- $stream : bool = false
-
Return as a stream?
Return values
mixed —The full text of the body part.
getBodyPartDecode()
Determines if/how a body part was MIME decoded on the server.
public
getBodyPartDecode(string $id) : string
Parameters
- $id : string
-
The MIME ID.
Return values
string —Either '8bit', 'binary', or null.
getBodyPartSize()
Returns the body part size, if returned by the server.
public
getBodyPartSize(string $id) : int
Parameters
- $id : string
-
The MIME ID.
Return values
int —The body part size, in bytes.
getBodyText()
Get a body text entry.
public
getBodyText(string $id[, bool $stream = false ]) : mixed
Parameters
- $id : string
-
The MIME ID.
- $stream : bool = false
-
Return as a stream?
Return values
mixed —The full text of the body text.
getEnvelope()
Get envelope data.
public
getEnvelope() : Horde_Imap_Client_Data_Envelope
Return values
Horde_Imap_Client_Data_Envelope —An envelope object.
getFlags()
Get IMAP flags.
public
getFlags() : array<string|int, mixed>
Return values
array<string|int, mixed> —An array of IMAP flags (all flags in lowercase).
getFullMsg()
Returns the full message.
public
getFullMsg([bool $stream = false ]) : mixed
Parameters
- $stream : bool = false
-
Return as a stream?
Return values
mixed —The full text of the entire message.
getHeaders()
Get a header entry.
public
getHeaders(string $label, int $format) : mixed
Parameters
- $label : string
-
The search label.
- $format : int
-
The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.
Return values
mixed —See $format.
getHeaderText()
Get a header text entry.
public
getHeaderText(string $id, int $format) : mixed
Parameters
- $id : string
-
The MIME ID.
- $format : int
-
The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.
Return values
mixed —See $format.
getImapDate()
Get internal IMAP date.
public
getImapDate() : Horde_Imap_Client_DateTime
Return values
Horde_Imap_Client_DateTime —A date object.
getMimeHeader()
Get a MIME header entry.
public
getMimeHeader(string $id, int $format) : mixed
Parameters
- $id : string
-
The MIME ID.
- $format : int
-
The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.
Return values
mixed —See $format.
getModSeq()
Get the modified sequence value for the message.
public
getModSeq() : int
Return values
int —The modseq value.
getRawData()
Return the internal representation of the data.
public
getRawData() : array<string|int, mixed>
Return values
array<string|int, mixed> —The data array.
getSeq()
Get message sequence number.
public
getSeq() : int
Return values
int —The message sequence number.
getSize()
Get message size.
public
getSize() : int
Return values
int —The size of the message, in bytes.
getStructure()
Get the message structure.
public
getStructure() : Horde_Mime_Part
Return values
Horde_Mime_Part —$structure The base MIME part of the message.
getUid()
Get UID.
public
getUid() : int
Return values
int —The message UID.
isDefault()
Does this object contain only default values for all fields?
public
isDefault() : bool
Return values
bool —True if object contains default data.
isDowngraded()
Does the message contain internationalized downgraded data (i.e. it is a "surrogate" message)?
public
isDowngraded() : bool
Tags
Return values
bool —True if at least one message components has been downgraded.
merge()
Merge a fetch object into this one.
public
merge(Horde_Imap_Client_Data_Fetch $data) : mixed
Parameters
- $data : Horde_Imap_Client_Data_Fetch
-
A fetch object.
Return values
mixed —setBodyPart()
Set a body part entry.
public
setBodyPart(string $id, mixed $text[, string $decode = null ]) : mixed
Parameters
- $id : string
-
The MIME ID.
- $text : mixed
-
The body part text, as either a string or stream resource.
- $decode : string = null
-
Either '8bit', 'binary', or null.
Return values
mixed —setBodyPartSize()
Set the body part size for a body part.
public
setBodyPartSize(string $id, int $size) : mixed
Parameters
- $id : string
-
The MIME ID.
- $size : int
-
The size (in bytes).
Return values
mixed —setBodyText()
Set a body text entry.
public
setBodyText(string $id, mixed $text) : mixed
Parameters
- $id : string
-
The MIME ID.
- $text : mixed
-
The body part text, as either a string or stream resource.
Return values
mixed —setDowngraded()
Set the internationalized downgraded status for the message.
public
setDowngraded(bool $downgraded) : mixed
Parameters
- $downgraded : bool
-
True if at least one message component has been downgraded.
Tags
Return values
mixed —setEnvelope()
Set envelope data.
public
setEnvelope(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
-
The envelope data to pass to the Envelope object constructor, or an Envelope object.
Return values
mixed —setFlags()
Set IMAP flags.
public
setFlags(array<string|int, mixed> $flags) : mixed
Parameters
- $flags : array<string|int, mixed>
-
An array of IMAP flags.
Return values
mixed —setFullMsg()
Set the full message property.
public
setFullMsg(mixed $msg) : mixed
Parameters
- $msg : mixed
-
The full message text, as either a string or stream resource.
Return values
mixed —setHeaders()
Set a header entry.
public
setHeaders(string $label, mixed $data) : mixed
Parameters
- $label : string
-
The search label.
- $data : mixed
-
Either a Horde_Mime_Headers object or the raw header text.
Return values
mixed —setHeaderText()
Set a header text entry.
public
setHeaderText(string $id, mixed $text) : mixed
Parameters
- $id : string
-
The MIME ID.
- $text : mixed
-
The header text, as either a string or stream resource.
Return values
mixed —setImapDate()
Set IMAP internal date.
public
setImapDate(mixed $date) : mixed
Parameters
- $date : mixed
-
Either a Horde_Imap_Client_DateTime object or a date string.
Return values
mixed —setMimeHeader()
Set a MIME header entry.
public
setMimeHeader(string $id, mixed $text) : mixed
Parameters
- $id : string
-
The MIME ID.
- $text : mixed
-
The header text, as either a string or stream resource.
Return values
mixed —setModSeq()
Set the modified sequence value for the message.
public
setModSeq(int $modseq) : mixed
Parameters
- $modseq : int
-
The modseq value.
Return values
mixed —setSeq()
Set message sequence number.
public
setSeq(int $seq) : mixed
Parameters
- $seq : int
-
The message sequence number.
Return values
mixed —setSize()
Set message size.
public
setSize(int $size) : mixed
Parameters
- $size : int
-
The size of the message, in bytes.
Return values
mixed —setStructure()
Set the message structure.
public
setStructure(Horde_Mime_Part $structure) : mixed
Parameters
- $structure : Horde_Mime_Part
-
The base MIME part of the message.
Return values
mixed —setUid()
Set UID.
public
setUid(int $uid) : mixed
Parameters
- $uid : int
-
The message UID.
Return values
mixed —_getHeaders()
Return representation of a header field.
protected
_getHeaders(string $id, int $format, int $key) : mixed
Parameters
- $id : string
-
The header id.
- $format : int
-
The return format. If self::HEADER_PARSE, returns a Horde_Mime_Headers object. If self::HEADER_STREAM, returns a stream. Otherwise, returns header text.
- $key : int
-
The array key where the data is stored in the internal array.
Return values
mixed —The data in the format specified by $format.
_msgText()
Return text representation of a field.
protected
_msgText(bool $stream, mixed $data) : mixed
Parameters
- $stream : bool
-
Return as a stream?
- $data : mixed
-
The field data (string or resource) or null if field does not exist.
Return values
mixed —Requested text representation.
_setMixed()
Converts mixed input (string or resource) to the correct internal representation.
protected
_setMixed(mixed $data) : mixed
Parameters
- $data : mixed
-
Mixed data (string, resource, Horde_Stream object).
Return values
mixed —The internal representation of that data.