\Horde_Imap_Client_Fetch_Query

Fetch query object for use with Horde_Imap_Client_Base#fetch().

Summary

Methods
Properties
Constants
fullText()
headerText()
bodyText()
mimeHeader()
bodyPart()
bodyPartSize()
headers()
structure()
envelope()
flags()
imapDate()
size()
uid()
seq()
modseq()
contains()
remove()
hash()
offsetExists()
offsetGet()
offsetSet()
offsetUnset()
count()
current()
key()
next()
rewind()
valid()
No public properties found
No constants found
No protected methods found
$_data
N/A
No private methods found
No private properties found
N/A

Properties

$_data

$_data : array

Internal data array.

Type

array

Methods

fullText()

fullText(array  $opts = array()) 

Get the full text of the message.

Parameters

array $opts

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.

headerText()

headerText(array  $opts = array()) 

Return header text.

Header text is defined only for the base RFC 2822 message or message/rfc822 parts.

Parameters

array $opts

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.

bodyText()

bodyText(array  $opts = array()) 

Return body text.

Body text is defined only for the base RFC 2822 message or message/rfc822 parts.

Parameters

array $opts

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.

mimeHeader()

mimeHeader(string  $id, array  $opts = array()) 

Return MIME header text.

MIME header text is defined only for non-RFC 2822 messages and non-message/rfc822 parts.

Parameters

string $id

The MIME ID to obtain the MIME header text for.

array $opts

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.

bodyPart()

bodyPart(string  $id, array  $opts = array()) 

Return the body part data for a MIME ID.

Parameters

string $id

The MIME ID to obtain the body part text for.

array $opts

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.

bodyPartSize()

bodyPartSize(string  $id) 

Returns the decoded body part size for a MIME ID.

Parameters

string $id

The MIME ID to obtain the decoded body part size for.

headers()

headers(string  $label, array  $search, array  $opts = array()) 

Returns RFC 2822 header text that matches a search string.

This header search work only with the base RFC 2822 message or message/rfc822 parts.

Parameters

string $label

A unique label associated with this particular search. This is how the results are stored.

array $search

The search string(s) (case-insensitive).

array $opts

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.

structure()

structure() 

Return MIME structure information.

envelope()

envelope() 

Return envelope header data.

flags()

flags() 

Return flags set for the message.

imapDate()

imapDate() 

Return the internal (IMAP) date of the message.

size()

size() 

Return the size (in bytes) of the message.

uid()

uid() 

Return the unique ID of the message.

seq()

seq() 

Return the sequence number of the message.

modseq()

modseq() 

Return the mod-sequence value for the message.

The server must support the CONDSTORE IMAP extension, and the mailbox must support mod-sequences.

contains()

contains(integer  $criteria) : boolean

Does the query contain the given criteria?

Parameters

integer $criteria

The criteria to remove.

Returns

boolean —

True if the query contains the given criteria.

remove()

remove(integer  $criteria, string  $key) 

Remove an entry under a given criteria.

Parameters

integer $criteria

Criteria ID.

string $key

The key to remove.

hash()

hash() : string

Returns a hash of the current query object.

Returns

string —

Hash.

offsetExists()

offsetExists(  $offset) 

Parameters

$offset

offsetGet()

offsetGet(  $offset) 

Parameters

$offset

offsetSet()

offsetSet(  $offset,   $value) 

Parameters

$offset
$value

offsetUnset()

offsetUnset(  $offset) 

Parameters

$offset

count()

count() 

current()

current() 

key()

key() 

next()

next() 

rewind()

rewind() 

valid()

valid()