PHP Class IMP_Mailbox_List, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements ArrayAccess, implements Countable, implements Iterator, implements Serializable
Afficher le fichier Open project: horde/horde Class Usage Examples

Méthodes publiques

Свойство Type Description
$changed boolean Has the internal message list changed?
$headersUsed array The list of headers used by this class.

Protected Properties

Свойство Type Description
$_buidmax integer Max assigned browser-UID.
$_buids array Mapping of browser-UIDs to UIDs.
$_cacheid string The IMAP cache ID of the mailbox.
$_mailbox IMP_Mailbox The mailbox to work with.
$_sorted array The array of sorted indices.
$_thread array The thread object representation(s) for the mailbox.
$_threadui array The thread tree UI cached data.

Méthodes publiques

Méthode Description
__construct ( string $mbox ) Constructor.
count ( ) : integer Returns the current message count of the mailbox.
current ( ) : array
getArrayIndex ( integer $uid, string $mbox = null ) : mixed Returns the array index of the given message UID.
getBuid ( string $mbox, integer $uid ) : integer Create a browser-UID from a mail UID.
getFullThread ( integer $uid, string $mbox = null ) : IMP_Indices Returns the list of UIDs for an entire thread given one message in that thread.
getIndicesOb ( ) : IMP_Indices Generate an IMP_Indices object out of the contents of this mailbox.
getMailboxArray ( array $msgnum ) : array Build the array of message information.
getThreadOb ( integer $offset ) : IMP_Mailbox_List_Thread Returns a thread object for a message.
key ( ) : integer
mailboxStart ( integer $total ) : integer Determines the sequence number of the first message to display, based on the user's preferences.
next ( )
offsetExists ( integer $offset )
offsetGet ( integer $offset ) : array
offsetSet ( $offset, $value )
offsetUnset ( $offset )
rebuild ( boolean $reset = false ) Rebuilds/resets the mailbox list.
resolveBuid ( integer $buid ) : array Resolve a mail UID from a browser-UID.
rewind ( )
serialize ( ) : string Serialization.
unseenMessages ( integer $results, array $opts = [] ) : mixed Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with UNDELETED if we're hiding deleted messages).
unserialize ( string $data ) Unserialization.
valid ( )

Méthodes protégées

Méthode Description
_buildMailbox ( ) Builds the sorted list of messages in the mailbox.
_buildMailboxProcess ( IMP_Mailbox $mbox, array $sorted ) : array Run after the initial mailbox search is completed.
_buildMailboxQuery ( )
_getMbox ( integer $id ) : IMP_Mailbox Get the mailbox for a sequence ID.
_getThread ( string $mbox, array $extra = [] ) : Horde_Imap_Client_Data_Thread Returns the thread object for a mailbox.
_serialize ( )
_unserialize ( $data )

Method Details

__construct() public méthode

Constructor.
public __construct ( string $mbox )
$mbox string The mailbox to work with.

_buildMailbox() protected méthode

Builds the sorted list of messages in the mailbox.
protected _buildMailbox ( )

_buildMailboxProcess() protected méthode

Run after the initial mailbox search is completed.
protected _buildMailboxProcess ( IMP_Mailbox $mbox, array $sorted ) : array
$mbox IMP_Mailbox Mailbox searched.
$sorted array Sorted list of UIDs.
Résultat array Sorted list of UIDs.

_buildMailboxQuery() protected méthode

protected _buildMailboxQuery ( )

_getMbox() protected méthode

Get the mailbox for a sequence ID.
protected _getMbox ( integer $id ) : IMP_Mailbox
$id integer Sequence ID.
Résultat IMP_Mailbox The mailbox.

_getThread() protected méthode

Returns the thread object for a mailbox.
protected _getThread ( string $mbox, array $extra = [] ) : Horde_Imap_Client_Data_Thread
$mbox string The mailbox.
$extra array Extra options to pass to IMAP thread() command.
Résultat Horde_Imap_Client_Data_Thread Thread object.

_serialize() protected méthode

protected _serialize ( )

_unserialize() protected méthode

protected _unserialize ( $data )

count() public méthode

Returns the current message count of the mailbox.
public count ( ) : integer
Résultat integer The mailbox message count.

current() public méthode

public current ( ) : array
Résultat array Two-element array: - m: (IMP_Mailbox) Mailbox of message. - u: (string) UID of message.

getArrayIndex() public méthode

Returns the array index of the given message UID.
public getArrayIndex ( integer $uid, string $mbox = null ) : mixed
$uid integer The message UID.
$mbox string The message mailbox (defaults to the current mailbox).
Résultat mixed The array index of the location of the message UID in the current mailbox. Returns null if not found.

getBuid() public méthode

Create a browser-UID from a mail UID.
public getBuid ( string $mbox, integer $uid ) : integer
$mbox string The mailbox.
$uid integer UID.
Résultat integer Browser-UID.

getFullThread() public méthode

Returns the list of UIDs for an entire thread given one message in that thread.
public getFullThread ( integer $uid, string $mbox = null ) : IMP_Indices
$uid integer The message UID.
$mbox string The message mailbox (defaults to the current mailbox).
Résultat IMP_Indices An indices object.

getIndicesOb() public méthode

Generate an IMP_Indices object out of the contents of this mailbox.
public getIndicesOb ( ) : IMP_Indices
Résultat IMP_Indices An indices object.

getMailboxArray() public méthode

Build the array of message information.
public getMailboxArray ( array $msgnum ) : array
$msgnum array An array of index numbers.
Résultat 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 for non-envelope headers.
    - idx: (integer) Array index of this message.
    - mailbox: (string) The mailbox containing the message.
    - size: (integer) The size of the message in bytes.
    - uid: (string) The unique ID of the message.
  - uids: (IMP_Indices) An indices object.

getThreadOb() public méthode

Returns a thread object for a message.
public getThreadOb ( integer $offset ) : IMP_Mailbox_List_Thread
$offset integer Sequence number of message.
Résultat IMP_Mailbox_List_Thread The thread object.

key() public méthode

public key ( ) : integer
Résultat integer Sequence number of message.

mailboxStart() public méthode

Determines the sequence number of the first message to display, based on the user's preferences.
public mailboxStart ( integer $total ) : integer
$total integer The total number of messages in the mailbox.
Résultat integer The sequence number in the sorted mailbox.

next() public méthode

public next ( )

offsetExists() public méthode

public offsetExists ( integer $offset )
$offset integer Sequence number of message.

offsetGet() public méthode

public offsetGet ( integer $offset ) : array
$offset integer Sequence number of message.
Résultat array Two-element array: - m: (IMP_Mailbox) Mailbox of message. - u: (string) UID of message.

offsetSet() public méthode

public offsetSet ( $offset, $value )

offsetUnset() public méthode

public offsetUnset ( $offset )

rebuild() public méthode

Rebuilds/resets the mailbox list.
public rebuild ( boolean $reset = false )
$reset boolean If true, resets the list instead of rebuilding.

resolveBuid() public méthode

Resolve a mail UID from a browser-UID.
public resolveBuid ( integer $buid ) : array
$buid integer Browser-UID.
Résultat array Two-element array: - m: (IMP_Mailbox) Mailbox of message. - u: (string) UID of message.

rewind() public méthode

public rewind ( )

serialize() public méthode

Serialization.
public serialize ( ) : string
Résultat string Serialized data.

unseenMessages() public méthode

Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with UNDELETED if we're hiding deleted messages).
public unseenMessages ( integer $results, array $opts = [] ) : mixed
$results integer A Horde_Imap_Client::SEARCH_RESULTS_* constant that indicates the desired return type.
$opts array 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
Résultat mixed Whatever is requested in $results.

unserialize() public méthode

Unserialization.
public unserialize ( string $data )
$data string Serialized data.

valid() public méthode

public valid ( )

Property Details

$_buidmax protected_oe property

Max assigned browser-UID.
protected int $_buidmax
Résultat integer

$_buids protected_oe property

Mapping of browser-UIDs to UIDs.
protected array $_buids
Résultat array

$_cacheid protected_oe property

The IMAP cache ID of the mailbox.
protected string $_cacheid
Résultat string

$_mailbox protected_oe property

The mailbox to work with.
protected IMP_Mailbox $_mailbox
Résultat IMP_Mailbox

$_sorted protected_oe property

The array of sorted indices.
protected array $_sorted
Résultat array

$_thread protected_oe property

The thread object representation(s) for the mailbox.
protected array $_thread
Résultat array

$_threadui protected_oe property

The thread tree UI cached data.
protected array $_threadui
Résultat array

$changed public_oe property

Has the internal message list changed?
public bool $changed
Résultat boolean

$headersUsed public_oe static_oe property

The list of headers used by this class.
public static array $headersUsed
Résultat array