Horde_Imap_Client_Cache_Backend
in package
implements
Serializable
The abstract backend class for storing IMAP cached data.
Tags
Interfaces, Classes, Traits and Enums
- Serializable
Table of Contents
- $_params : array<string|int, mixed>
- Configuration paramters.
- __construct() : mixed
- Constructor.
- __serialize() : array<string|int, mixed>
- __unserialize() : mixed
- clear() : mixed
- Clear the cache.
- deleteMailbox() : mixed
- Delete a mailbox from the cache.
- deleteMsgs() : mixed
- Delete messages in the cache.
- get() : array<string|int, mixed>
- Get information from the cache for a set of UIDs.
- getCachedUids() : array<string|int, mixed>
- Get the list of cached UIDs.
- getMetaData() : array<string|int, mixed>
- Get metadata information for a mailbox.
- serialize() : mixed
- set() : mixed
- Store data in cache.
- setMetaData() : mixed
- Set metadata information for a mailbox.
- setParams() : mixed
- Add configuration parameters.
- unserialize() : mixed
- _initOb() : mixed
- Initialization tasks.
Properties
$_params
Configuration paramters.
protected
array<string|int, mixed>
$_params
= array()
Values set by the base Cache object: hostspec, port, username
Methods
__construct()
Constructor.
public
__construct([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Configuration parameters.
Return values
mixed —__serialize()
public
__serialize() : array<string|int, mixed>
Return values
array<string|int, mixed> —__unserialize()
public
__unserialize(array<string|int, mixed> $data) : mixed
Parameters
- $data : array<string|int, mixed>
Return values
mixed —clear()
Clear the cache.
public
abstract clear(int $lifetime) : mixed
Parameters
- $lifetime : int
-
Only delete entries older than this (in seconds). If null, deletes all entries.
Return values
mixed —deleteMailbox()
Delete a mailbox from the cache.
public
abstract deleteMailbox(string $mailbox) : mixed
Parameters
- $mailbox : string
-
The mailbox to delete.
Return values
mixed —deleteMsgs()
Delete messages in the cache.
public
abstract deleteMsgs(string $mailbox, array<string|int, mixed> $uids) : mixed
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $uids : array<string|int, mixed>
-
The list of message UIDs to delete.
Return values
mixed —get()
Get information from the cache for a set of UIDs.
public
abstract get(string $mailbox, array<string|int, mixed> $uids, array<string|int, mixed> $fields, int $uidvalid) : array<string|int, mixed>
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $uids : array<string|int, mixed>
-
The list of message UIDs to retrieve information for.
- $fields : array<string|int, mixed>
-
An array of fields to retrieve. If empty, returns all cached fields.
- $uidvalid : int
-
The IMAP uidvalidity value of the mailbox.
Return values
array<string|int, mixed> —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()
Get the list of cached UIDs.
public
abstract getCachedUids(string $mailbox, int $uidvalid) : array<string|int, mixed>
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $uidvalid : int
-
The IMAP uidvalidity value of the mailbox.
Return values
array<string|int, mixed> —The (unsorted) list of cached UIDs.
getMetaData()
Get metadata information for a mailbox.
public
abstract getMetaData(string $mailbox, int $uidvalid, array<string|int, mixed> $entries) : array<string|int, mixed>
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $uidvalid : int
-
The IMAP uidvalidity value of the mailbox.
- $entries : array<string|int, mixed>
-
An array of entries to return. If empty, returns all metadata.
Return values
array<string|int, mixed> —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.
serialize()
public
serialize() : mixed
Return values
mixed —set()
Store data in cache.
public
abstract set(string $mailbox, array<string|int, mixed> $data, int $uidvalid) : mixed
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $data : array<string|int, mixed>
-
The list of data to save. The keys are the UIDs, the values are an array of information to save.
- $uidvalid : int
-
The IMAP uidvalidity value of the mailbox.
Return values
mixed —setMetaData()
Set metadata information for a mailbox.
public
abstract setMetaData(string $mailbox, array<string|int, mixed> $data) : mixed
Parameters
- $mailbox : string
-
An IMAP mailbox string.
- $data : array<string|int, mixed>
-
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.)
Return values
mixed —setParams()
Add configuration parameters.
public
setParams([array<string|int, mixed> $params = array() ]) : mixed
Parameters
- $params : array<string|int, mixed> = array()
-
Configuration parameters.
Return values
mixed —unserialize()
public
unserialize(mixed $data) : mixed
Parameters
- $data : mixed
Return values
mixed —_initOb()
Initialization tasks.
protected
_initOb() : mixed