Documentation

IMP_Mailbox_List_Pop3 extends IMP_Mailbox_List
in package

This class contains code related to generating and handling a mailbox message list for POP3 servers.

Tags
author

Michael Slusarz slusarz@horde.org

category

Horde

copyright

2013-2017 Horde LLC

license

http://www.horde.org/licenses/gpl GPL

Table of Contents

Constants

SERIALIZE_LIMIT  = 500

Properties

$changed  : bool
Has the internal message list changed?
$headersUsed  : array<string|int, mixed>
The list of headers used by this class.
$_buidmax  : int
Max assigned browser-UID.
$_buids  : array<string|int, mixed>
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<string|int, mixed>
The array of sorted indices.
$_thread  : array<string|int, mixed>
The thread object representation(s) for the mailbox.
$_threadui  : array<string|int, mixed>
The thread tree UI cached data.

Methods

__construct()  : mixed
Constructor.
__serialize()  : array<string|int, mixed>
__unserialize()  : void
count()  : int
Returns the current message count of the mailbox.
current()  : array<string|int, mixed>
getArrayIndex()  : mixed
Returns the array index of the given message UID.
getBuid()  : int
Create a browser-UID from a mail UID.
getFullThread()  : 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<string|int, mixed>
Build the array of message information.
getThreadOb()  : IMP_Mailbox_List_Thread
Returns a thread object for a message.
key()  : int
mailboxStart()  : int
Determines the sequence number of the first message to display, based on the user's preferences.
next()  : mixed
offsetExists()  : bool
offsetGet()  : array<string|int, mixed>
offsetSet()  : mixed
offsetUnset()  : void
rebuild()  : mixed
Rebuilds/resets the mailbox list.
resolveBuid()  : array<string|int, mixed>
Resolve a mail UID from a browser-UID.
rewind()  : mixed
serialize()  : string
Serialization.
unseenMessages()  : mixed
Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with UNDELETED if we're hiding deleted messages).
unserialize()  : mixed
Unserialization.
valid()  : bool
_buildMailbox()  : mixed
Builds the sorted list of messages in the mailbox.
_buildMailboxProcess()  : array<string|int, mixed>
Run after the initial mailbox search is completed.
_buildMailboxQuery()  : mixed
_getMbox()  : IMP_Mailbox
Get the mailbox for a sequence ID.
_getThread()  : Horde_Imap_Client_Data_Thread
Returns the thread object for a mailbox.
_serialize()  : mixed
_unserialize()  : mixed

Constants

SERIALIZE_LIMIT

public mixed SERIALIZE_LIMIT = 500

Properties

$changed

Has the internal message list changed?

public bool $changed = \false

$headersUsed

The list of headers used by this class.

public static array<string|int, mixed> $headersUsed = array('content-type', 'importance', 'list-post', 'x-priority')

$_buidmax

Max assigned browser-UID.

protected int $_buidmax = 0

$_buids

Mapping of browser-UIDs to UIDs.

protected array<string|int, mixed> $_buids = array()

$_cacheid

The IMAP cache ID of the mailbox.

protected string $_cacheid = \null

$_sorted

The array of sorted indices.

protected array<string|int, mixed> $_sorted = \null

$_thread

The thread object representation(s) for the mailbox.

protected array<string|int, mixed> $_thread = array()

$_threadui

The thread tree UI cached data.

protected array<string|int, mixed> $_threadui = array()

Methods

__construct()

Constructor.

public __construct(string $mbox) : mixed
Parameters
$mbox : string

The mailbox to work with.

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

count()

Returns the current message count of the mailbox.

public count() : int
Return values
int —

The mailbox message count.

current()

public current() : array<string|int, mixed>
Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed> —

Two-element array:

  • m: (IMP_Mailbox) Mailbox of message.
  • u: (string) UID of message.

getArrayIndex()

Returns the array index of the given message UID.

public getArrayIndex(int $uid[, string $mbox = null ]) : mixed
Parameters
$uid : int

The message UID.

$mbox : string = null

The message mailbox (defaults to the current mailbox).

Return values
mixed —

The array index of the location of the message UID in the current mailbox. Returns null if not found.

getBuid()

Create a browser-UID from a mail UID.

public getBuid(mixed $mbox, mixed $uid) : int
Parameters
$mbox : mixed

The mailbox.

$uid : mixed

UID.

Return values
int —

Browser-UID.

getFullThread()

Returns the list of UIDs for an entire thread given one message in that thread.

public getFullThread(int $uid[, string $mbox = null ]) : IMP_Indices
Parameters
$uid : int

The message UID.

$mbox : string = null

The message mailbox (defaults to the current mailbox).

Return values
IMP_Indices —

An indices object.

getIndicesOb()

Generate an IMP_Indices object out of the contents of this mailbox.

public getIndicesOb() : IMP_Indices
Return values
IMP_Indices —

An indices object.

getMailboxArray()

Build the array of message information.

public getMailboxArray(array<string|int, mixed> $msgnum) : array<string|int, mixed>
Parameters
$msgnum : array<string|int, mixed>

An array of index numbers.

Return values
array<string|int, mixed> —

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.

key()

public key() : int
Attributes
#[ReturnTypeWillChange]
Return values
int —

Sequence number of message.

mailboxStart()

Determines the sequence number of the first message to display, based on the user's preferences.

public mailboxStart(int $total) : int
Parameters
$total : int

The total number of messages in the mailbox.

Return values
int —

The sequence number in the sorted mailbox.

next()

public next() : mixed
Attributes
#[ReturnTypeWillChange]

offsetExists()

public offsetExists(int $offset) : bool
Parameters
$offset : int

Sequence number of message.

Return values
bool

offsetGet()

public offsetGet(int $offset) : array<string|int, mixed>
Parameters
$offset : int

Sequence number of message.

Attributes
#[ReturnTypeWillChange]
Return values
array<string|int, mixed> —

Two-element array:

  • m: (IMP_Mailbox) Mailbox of message.
  • u: (string) UID of message.

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Tags
throws
BadMethodCallException
Attributes
#[ReturnTypeWillChange]

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Tags
throws
BadMethodCallException

rebuild()

Rebuilds/resets the mailbox list.

public rebuild([bool $reset = false ]) : mixed
Parameters
$reset : bool = false

If true, resets the list instead of rebuilding.

resolveBuid()

Resolve a mail UID from a browser-UID.

public resolveBuid(mixed $buid) : array<string|int, mixed>
Parameters
$buid : mixed

Browser-UID.

Return values
array<string|int, mixed> —

Two-element array:

  • m: (IMP_Mailbox) Mailbox of message.
  • u: (string) UID of message.

rewind()

public rewind() : mixed
Attributes
#[ReturnTypeWillChange]

serialize()

Serialization.

public serialize() : string
Return values
string —

Serialized data.

unseenMessages()

Get the list of unseen messages in the mailbox (IMAP UNSEEN flag, with UNDELETED if we're hiding deleted messages).

public unseenMessages(int $results[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
$results : int

A Horde_Imap_Client::SEARCH_RESULTS_* constant that indicates the desired return type.

$opts : array<string|int, mixed> = 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
Return values
mixed —

Whatever is requested in $results.

unserialize()

Unserialization.

public unserialize(string $data) : mixed
Parameters
$data : string

Serialized data.

Tags
throws
Exception

valid()

public valid() : bool
Attributes
#[ReturnTypeWillChange]
Return values
bool

_buildMailbox()

Builds the sorted list of messages in the mailbox.

protected _buildMailbox() : mixed

_buildMailboxProcess()

Run after the initial mailbox search is completed.

protected _buildMailboxProcess(IMP_Mailbox $mbox, array<string|int, mixed> $sorted) : array<string|int, mixed>
Parameters
$mbox : IMP_Mailbox

Mailbox searched.

$sorted : array<string|int, mixed>

Sorted list of UIDs.

Return values
array<string|int, mixed> —

Sorted list of UIDs.

_buildMailboxQuery()

protected _buildMailboxQuery() : mixed

_getMbox()

Get the mailbox for a sequence ID.

protected _getMbox(int $id) : IMP_Mailbox
Parameters
$id : int

Sequence ID.

Return values
IMP_Mailbox —

The mailbox.

_getThread()

Returns the thread object for a mailbox.

protected _getThread(string $mbox[, array<string|int, mixed> $extra = array() ]) : Horde_Imap_Client_Data_Thread
Parameters
$mbox : string

The mailbox.

$extra : array<string|int, mixed> = array()

Extra options to pass to IMAP thread() command.

Return values
Horde_Imap_Client_Data_Thread —

Thread object.

_serialize()

protected _serialize() : mixed

_unserialize()

protected _unserialize(mixed $data) : mixed
Parameters
$data : mixed

        
On this page

Search results