PHP Class Horde_Imap_Client_Cache_Backend, horde

Author: Michael Slusarz ([email protected])
Inheritance: implements Serializable
Mostrar archivo Open project: horde/horde Class Usage Examples

Protected Properties

Property Type Description
$_params array Values set by the base Cache object: hostspec, port, username

Public Methods

Method Description
__construct ( array $params = [] ) Constructor.
clear ( integer $lifetime ) Clear the cache.
deleteMailbox ( string $mailbox ) Delete a mailbox from the cache.
deleteMsgs ( string $mailbox, array $uids ) Delete messages in the cache.
get ( string $mailbox, array $uids, array $fields, integer $uidvalid ) : array Get information from the cache for a set of UIDs.
getCachedUids ( string $mailbox, integer $uidvalid ) : array Get the list of cached UIDs.
getMetaData ( string $mailbox, integer $uidvalid, array $entries ) : array Get metadata information for a mailbox.
serialize ( )
set ( string $mailbox, array $data, integer $uidvalid ) Store data in cache.
setMetaData ( string $mailbox, array $data ) Set metadata information for a mailbox.
setParams ( array $params = [] ) Add configuration parameters.
unserialize ( $data )

Protected Methods

Method Description
_initOb ( ) Initialization tasks.

Method Details

__construct() public method

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters.

_initOb() protected method

Initialization tasks.
protected _initOb ( )

clear() abstract public method

Clear the cache.
abstract public clear ( integer $lifetime )
$lifetime integer Only delete entries older than this (in seconds). If null, deletes all entries.

deleteMailbox() abstract public method

Delete a mailbox from the cache.
abstract public deleteMailbox ( string $mailbox )
$mailbox string The mailbox to delete.

deleteMsgs() abstract public method

Delete messages in the cache.
abstract public deleteMsgs ( string $mailbox, array $uids )
$mailbox string An IMAP mailbox string.
$uids array The list of message UIDs to delete.

get() abstract public method

Get information from the cache for a set of UIDs.
abstract public get ( string $mailbox, array $uids, array $fields, integer $uidvalid ) : array
$mailbox string An IMAP mailbox string.
$uids array The list of message UIDs to retrieve information for.
$fields array An array of fields to retrieve. If empty, returns all cached fields.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
return 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() abstract public method

Get the list of cached UIDs.
abstract public getCachedUids ( string $mailbox, integer $uidvalid ) : array
$mailbox string An IMAP mailbox string.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
return array The (unsorted) list of cached UIDs.

getMetaData() abstract public method

Get metadata information for a mailbox.
abstract public getMetaData ( string $mailbox, integer $uidvalid, array $entries ) : array
$mailbox string An IMAP mailbox string.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
$entries array An array of entries to return. If empty, returns all metadata.
return 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.

serialize() public method

public serialize ( )

set() abstract public method

Store data in cache.
abstract public set ( string $mailbox, array $data, integer $uidvalid )
$mailbox string An IMAP mailbox string.
$data array The list of data to save. The keys are the UIDs, the values are an array of information to save.
$uidvalid integer The IMAP uidvalidity value of the mailbox.

setMetaData() abstract public method

Set metadata information for a mailbox.
abstract public setMetaData ( string $mailbox, array $data )
$mailbox string An IMAP mailbox string.
$data array 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.)

setParams() public method

Add configuration parameters.
public setParams ( array $params = [] )
$params array Configuration parameters.

unserialize() public method

public unserialize ( $data )

Property Details

$_params protected_oe property

Values set by the base Cache object: hostspec, port, username
protected array $_params
return array