CID_SEPARATOR
CID_SEPARATOR
Separator for CID between mailbox and UID.
A Horde_HashTable implementation for caching IMAP/POP data.
Requires the Horde_HashTable and Horde_Pack packages.
__construct(array $params = array())
Constructor.
array | $params | Configuration parameters: - REQUIRED parameters: - hashtable: (Horde_HashTable) A HashTable object. - Optional Parameters: - lifetime: (integer) The lifetime of the cache data (in seconds). DEFAULT: 604800 seconds (1 week) [@since 2.19.0] |
get(string $mailbox, array $uids, array $fields, integer $uidvalid) : array
Get information from the cache for a set of UIDs.
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. |
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).
set(string $mailbox, array $data, integer $uidvalid)
Store data in cache.
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(string $mailbox, integer $uidvalid, array $entries) : array
Get metadata information for a mailbox.
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. |
The requested metadata. Requested entries that do not exist will be undefined. The following entries are defaults and always present:
setMetaData(string $mailbox, array $data)
Set metadata information for a mailbox.
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.) |