Methods summary
public
|
#
__construct( string $mbox )
Constructor.
Parameters
- $mbox
- The mailbox to work with.
|
public
array
|
#
getMailboxArray( array $msgnum, array $options = array() )
Build the array of message information.
Build the array of message information.
Parameters
- $msgnum
- An array of index numbers.
- $options
- <p>Additional options:
- headers: (boolean) Return info on the non-envelope headers
'Importance', 'List-Post', and 'X-Priority'.
DEFAULT: false (only envelope headers returned)
- preview: (mixed) Include preview information? If empty, add no
preview information. If 1, uses value from prefs.
If 2, forces addition of preview info.
DEFAULT: No preview information.
- type: (boolean) Return info on the MIME Content-Type of the base
message part ('Content-Type' header).
DEFAULT: false</p>
Returns
array An array with the following keys:
- overview: (array) The overview information. Contains the following:
- envelope: (Horde_Imap_Client_Data_Envelope) Envelope information
returned from the IMAP server.
- flags: (array) The list of IMAP flags returned from the server.
- headers: (array) Horde_Mime_Headers objects containing header data
if either $options['headers'] or $options['type'] are
true.
- idx: (integer) Array index of this message.
- mailbox: (string) The mailbox containing the message.
- preview: (string) If requested in $options['preview'], the preview
text.
- previewcut: (boolean) Has the preview text been cut?
- size: (integer) The size of the message in bytes.
- uid: (string) The unique ID of the message.
- uids: (IMP_Indices) An indices object.
|
public
array
|
#
buildMailboxPage( integer $page = 0, integer $start = 0 )
Using the preferences and the current mailbox, determines the messages
to view on the current page (if using a paged view).
Using the preferences and the current mailbox, determines the messages
to view on the current page (if using a paged view).
Parameters
- $page
- The page number currently being displayed.
- $start
- The starting message number.
Returns
array An array with the following fields:
- anymsg: (boolean) Are there any messages at all in mailbox? E.g. If
'msgcount' is 0, there may still be hidden deleted messages.
- begin: (integer) The beginning message sequence number of the page.
- end: (integer) The ending message sequence number of the page.
- msgcount: (integer) The number of viewable messages in the current
mailbox.
- page: (integer) The current page number.
- pagecount: (integer) The number of pages in this mailbox.
|
public
boolean
|
#
isBuilt( )
Returns true if the mailbox data has been built.
Returns true if the mailbox data has been built.
Returns
boolean True if the mailbox has been built.
|
public
mixed
|
#
unseenMessages( integer $results, array $opts = array() )
Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with
UNDELETED if we're hiding deleted messages).
Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with
UNDELETED if we're hiding deleted messages).
Parameters
- $results
- <p>A Horde_Imap_Client::SEARCH_RESULTS_* constant
that indicates the desired return type.</p>
- $opts
- <p>Additional options:
- sort: (array) List of sort criteria to use.
- uids: (boolean) Return UIDs instead of sequence numbers (for
$results queries that return message lists).
DEFAULT: false</p>
Returns
mixed Whatever is requested in $results.
|
public
integer
|
#
mailboxStart( integer $total )
Determines the sequence number of the first message to display, based
on the user's preferences.
Determines the sequence number of the first message to display, based
on the user's preferences.
Parameters
- $total
- The total number of messages in the mailbox.
Returns
integer The sequence number in the sorted mailbox.
|
public
|
#
rebuild( boolean $reset = false )
Rebuilds/resets the mailbox list.
Rebuilds/resets the mailbox list.
Parameters
- $reset
- If true, resets the list instead of rebuilding.
|
public
mixed
|
#
getArrayIndex( integer $uid, string $mbox = null )
Returns the array index of the given message UID.
Returns the array index of the given message UID.
Parameters
- $uid
- The message UID.
- $mbox
- <p>The message mailbox (defaults to the current
mailbox).</p>
Returns
mixed The array index of the location of the message UID in
the current mailbox. Returns null if not found.
|
public
IMP_Indices
|
#
getIndicesOb( )
Generate an IMP_Indices object out of the contents of this mailbox.
Generate an IMP_Indices object out of the contents of this mailbox.
Returns
|
public
boolean
|
#
removeMsgs( mixed $indices )
Removes messages from the mailbox.
Removes messages from the mailbox.
Parameters
- $indices
- <p>An IMP_Indices object or true to remove all
messages in the mailbox.</p>
Returns
boolean True if the message was removed from the mailbox.
|
public
IMP_Indices
|
#
getFullThread( integer $uid, string $mbox = null )
Returns the list of UIDs for an entire thread given one message in
that thread.
Returns the list of UIDs for an entire thread given one message in
that thread.
Parameters
- $uid
- The message UID.
- $mbox
- <p>The message mailbox (defaults to the current
mailbox).</p>
Returns
|
public
IMP_Mailbox_List_Thread
|
#
getThreadOb( integer $offset )
Returns a thread object for a message.
Returns a thread object for a message.
Parameters
- $offset
- Sequence number of message.
Returns
|
public
integer
|
#
getBuid( string $mbox, integer $uid )
Create a browser-UID from a mail UID.
Create a browser-UID from a mail UID.
Parameters
- $mbox
- The mailbox.
- $uid
- UID.
Returns
integer Browser-UID.
|
public
array
|
#
resolveBuid( integer $buid )
Resolve a mail UID from a browser-UID.
Resolve a mail UID from a browser-UID.
Parameters
Returns
array Two-element array:
- m: (IMP_Mailbox) Mailbox of message.
- u: (string) UID of message.
|
public
integer
|
#
getIndex( )
Returns the current message array index. If the array index has
run off the end of the message array, will return the first index.
Returns the current message array index. If the array index has
run off the end of the message array, will return the first index.
Returns
integer The message array index.
|
public
boolean
|
#
isValidIndex( )
Checks to see if the current index is valid.
Checks to see if the current index is valid.
Returns
boolean True if index is valid, false if not.
|
public
|
#
setIndex( mixed $data )
Updates the message array index.
Updates the message array index.
Parameters
- $data
- <p>If an integer, the number of messages to increase
the array index by. If an indices object, sets
array index to the index value.</p>
|
public
|
#
offsetExists( integer $offset )
Parameters
- $offset
- Sequence number of message.
Implementation of
ArrayAccess::offsetExists()
|
public
array
|
#
offsetGet( integer $offset )
Parameters
- $offset
- Sequence number of message.
Returns
array Two-element array:
- m: (IMP_Mailbox) Mailbox of message.
- u: (string) UID of message.
Implementation of
ArrayAccess::offsetGet()
|
public
|
#
offsetSet( mixed $offset, mixed $value )
Throws
BadMethodCallException
Implementation of
ArrayAccess::offsetSet()
|
public
|
#
offsetUnset( mixed $offset )
Throws
BadMethodCallException
Implementation of
ArrayAccess::offsetUnset()
|
public
integer
|
#
count( )
Returns the current message count of the mailbox.
Returns the current message count of the mailbox.
Returns
integer The mailbox message count.
Implementation of
Countable::count()
|
public
array
|
#
current( )
Returns
array Two-element array:
- m: (IMP_Mailbox) Mailbox of message.
- u: (string) UID of message.
Implementation of
Iterator::current()
|
public
integer
|
#
key( )
Returns
integer Sequence number of message.
Implementation of
Iterator::key()
|
public
|
#
next( )
Implementation of
Iterator::next()
|
public
|
#
rewind( )
Implementation of
Iterator::rewind()
|
public
|
#
valid( )
Implementation of
Iterator::valid()
|
public
string
|
#
serialize( )
Serialization.
Returns
string Serialized data.
Implementation of
Serializable::serialize()
|
public
|
#
unserialize( string $data )
Unserialization.
Parameters
Throws
Exception
Implementation of
Serializable::unserialize()
|