Horde_Imap_Client_Fetch_Query
in package
implements
ArrayAccess, Countable, Iterator
Fetch query object for use with Horde_Imap_Client_Base#fetch().
Tags
Interfaces, Classes, Traits and Enums
- ArrayAccess
- Countable
- Iterator
Table of Contents
- $_data : array<string|int, mixed>
- Internal data array.
- bodyPart() : mixed
- Return the body part data for a MIME ID.
- bodyPartSize() : mixed
- Returns the decoded body part size for a MIME ID.
- bodyText() : mixed
- Return body text.
- contains() : bool
- Does the query contain the given criteria?
- count() : mixed
- current() : mixed
- envelope() : mixed
- Return envelope header data.
- flags() : mixed
- Return flags set for the message.
- fullText() : mixed
- Get the full text of the message.
- hash() : string
- Returns a hash of the current query object.
- headers() : mixed
- Returns RFC 2822 header text that matches a search string.
- headerText() : mixed
- Return header text.
- imapDate() : mixed
- Return the internal (IMAP) date of the message.
- key() : mixed
- mimeHeader() : mixed
- Return MIME header text.
- modseq() : mixed
- Return the mod-sequence value for the message.
- next() : mixed
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- remove() : mixed
- Remove an entry under a given criteria.
- rewind() : mixed
- seq() : mixed
- Return the sequence number of the message.
- size() : mixed
- Return the size (in bytes) of the message.
- structure() : mixed
- Return MIME structure information.
- uid() : mixed
- Return the unique ID of the message.
- valid() : mixed
Properties
$_data
Internal data array.
protected
array<string|int, mixed>
$_data
= array()
Methods
bodyPart()
Return the body part data for a MIME ID.
public
bodyPart(string $id[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $id : string
-
The MIME ID to obtain the body part text for.
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- decode: (boolean) Attempt to server-side decode the bodypart data if it is MIME transfer encoded. DEFAULT: false
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —bodyPartSize()
Returns the decoded body part size for a MIME ID.
public
bodyPartSize(string $id) : mixed
Parameters
- $id : string
-
The MIME ID to obtain the decoded body part size for.
Return values
mixed —bodyText()
Return body text.
public
bodyText([array<string|int, mixed> $opts = array() ]) : mixed
Body text is defined only for the base RFC 2822 message or message/rfc822 parts.
Parameters
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- id: (string) The MIME ID to obtain the body text for. DEFAULT: The body text for the entire message will be returned.
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —contains()
Does the query contain the given criteria?
public
contains(int $criteria) : bool
Parameters
- $criteria : int
-
The criteria to remove.
Return values
bool —True if the query contains the given criteria.
count()
public
count() : mixed
Return values
mixed —current()
public
current() : mixed
Return values
mixed —envelope()
Return envelope header data.
public
envelope() : mixed
Return values
mixed —flags()
Return flags set for the message.
public
flags() : mixed
Return values
mixed —fullText()
Get the full text of the message.
public
fullText([array<string|int, mixed> $opts = array() ]) : mixed
Parameters
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —hash()
Returns a hash of the current query object.
public
hash() : string
Return values
string —Hash.
headers()
Returns RFC 2822 header text that matches a search string.
public
headers(string $label, array<string|int, mixed> $search[, array<string|int, mixed> $opts = array() ]) : mixed
This header search work only with the base RFC 2822 message or message/rfc822 parts.
Parameters
- $label : string
-
A unique label associated with this particular search. This is how the results are stored.
- $search : array<string|int, mixed>
-
The search string(s) (case-insensitive).
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- cache: (boolean) If true, and 'peek' is also true, will cache the result of this call. DEFAULT: false
- id: (string) The MIME ID to search. DEFAULT: The base message part
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- notsearch: (boolean) Do a 'NOT' search on the headers. DEFAULT: false
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —headerText()
Return header text.
public
headerText([array<string|int, mixed> $opts = array() ]) : mixed
Header text is defined only for the base RFC 2822 message or message/rfc822 parts.
Parameters
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- id: (string) The MIME ID to obtain the header text for. DEFAULT: The header text for the base message will be returned.
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —imapDate()
Return the internal (IMAP) date of the message.
public
imapDate() : mixed
Return values
mixed —key()
public
key() : mixed
Return values
mixed —mimeHeader()
Return MIME header text.
public
mimeHeader(string $id[, array<string|int, mixed> $opts = array() ]) : mixed
MIME header text is defined only for non-RFC 2822 messages and non-message/rfc822 parts.
Parameters
- $id : string
-
The MIME ID to obtain the MIME header text for.
- $opts : array<string|int, mixed> = array()
-
The following options are available:
- length: (integer) The length of the substring to return. DEFAULT: The entire text is returned.
- peek: (boolean) If set, does not set the '\Seen' flag on the message. DEFAULT: The seen flag is set.
- start: (integer) If a portion of the full text is desired to be returned, the starting position is identified here. DEFAULT: The entire text is returned.
Return values
mixed —modseq()
Return the mod-sequence value for the message.
public
modseq() : mixed
The server must support the CONDSTORE IMAP extension, and the mailbox must support mod-sequences.
Return values
mixed —next()
public
next() : mixed
Return values
mixed —offsetExists()
public
offsetExists(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —offsetSet()
public
offsetSet(mixed $offset, mixed $value) : mixed
Parameters
- $offset : mixed
- $value : mixed
Return values
mixed —offsetUnset()
public
offsetUnset(mixed $offset) : mixed
Parameters
- $offset : mixed
Return values
mixed —remove()
Remove an entry under a given criteria.
public
remove(int $criteria, string $key) : mixed
Parameters
- $criteria : int
-
Criteria ID.
- $key : string
-
The key to remove.
Return values
mixed —rewind()
public
rewind() : mixed
Return values
mixed —seq()
Return the sequence number of the message.
public
seq() : mixed
Return values
mixed —size()
Return the size (in bytes) of the message.
public
size() : mixed
Return values
mixed —structure()
Return MIME structure information.
public
structure() : mixed
Return values
mixed —uid()
Return the unique ID of the message.
public
uid() : mixed
Return values
mixed —valid()
public
valid() : mixed