\Horde_Imap_Client_Cache_Backend

The abstract backend class for storing IMAP cached data.

Summary

Methods
Properties
Constants
__construct()
setParams()
get()
getCachedUids()
set()
getMetaData()
setMetaData()
deleteMsgs()
deleteMailbox()
clear()
serialize()
unserialize()
No public properties found
No constants found
_initOb()
$_params
N/A
No private methods found
No private properties found
N/A

Properties

$_params

$_params : array

Configuration paramters.

Values set by the base Cache object: hostspec, port, username

Type

array

Methods

__construct()

__construct(array  $params = array()) 

Constructor.

Parameters

array $params

Configuration parameters.

setParams()

setParams(array  $params = array()) 

Add configuration parameters.

Parameters

array $params

Configuration parameters.

get()

get(string  $mailbox, array  $uids, array  $fields, integer  $uidvalid) : array

Get information from the cache for a set of UIDs.

Parameters

string $mailbox

An IMAP mailbox string.

array $uids

The list of message UIDs to retrieve information for.

array $fields

An array of fields to retrieve. If empty, returns all cached fields.

integer $uidvalid

The IMAP uidvalidity value of the mailbox.

Returns

array —

An array of arrays with the UID of the message as the key (if found) and the fields as values (will be undefined if not found).

getCachedUids()

getCachedUids(string  $mailbox, integer  $uidvalid) : array

Get the list of cached UIDs.

Parameters

string $mailbox

An IMAP mailbox string.

integer $uidvalid

The IMAP uidvalidity value of the mailbox.

Returns

array —

The (unsorted) list of cached UIDs.

set()

set(string  $mailbox, array  $data, integer  $uidvalid) 

Store data in cache.

Parameters

string $mailbox

An IMAP mailbox string.

array $data

The list of data to save. The keys are the UIDs, the values are an array of information to save.

integer $uidvalid

The IMAP uidvalidity value of the mailbox.

getMetaData()

getMetaData(string  $mailbox, integer  $uidvalid, array  $entries) : array

Get metadata information for a mailbox.

Parameters

string $mailbox

An IMAP mailbox string.

integer $uidvalid

The IMAP uidvalidity value of the mailbox.

array $entries

An array of entries to return. If empty, returns all metadata.

Returns

array —

The requested metadata. Requested entries that do not exist will be undefined. The following entries are defaults and always present:

  • uidvalid: (integer) The UIDVALIDITY of the mailbox.

setMetaData()

setMetaData(string  $mailbox, array  $data) 

Set metadata information for a mailbox.

Parameters

string $mailbox

An IMAP mailbox string.

array $data

The list of data to save. The keys are the metadata IDs, the values are the associated data. (If present, uidvalidity appears as the 'uidvalid' key in $data.)

deleteMsgs()

deleteMsgs(string  $mailbox, array  $uids) 

Delete messages in the cache.

Parameters

string $mailbox

An IMAP mailbox string.

array $uids

The list of message UIDs to delete.

deleteMailbox()

deleteMailbox(string  $mailbox) 

Delete a mailbox from the cache.

Parameters

string $mailbox

The mailbox to delete.

clear()

clear(integer  $lifetime) 

Clear the cache.

Parameters

integer $lifetime

Only delete entries older than this (in seconds). If null, deletes all entries.

serialize()

serialize() 

unserialize()

unserialize(  $data) 

Parameters

$data

_initOb()

_initOb() 

Initialization tasks.