PHP Class Horde_Imap_Client_Cache, horde

Author: Michael Slusarz ([email protected])
Afficher le fichier Open project: horde/horde Class Usage Examples

Protected Properties

Свойство Type Description
$_backend Horde_Imap_Client_Cache_Backend Storage backend.
$_baseob Horde_Imap_Client_Base Base client object.
$_debug Horde_Imap_Client_Base_Debug Debug output.
$_params array The configuration params.

Méthodes publiques

Méthode Description
__construct ( array $params = [] ) Constructor.
clear ( integer $lifetime = null ) Clear the cache.
deleteMailbox ( string $mbox ) 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 = null ) : array Get information from the cache.
getMetaData ( string $mailbox, integer $uidvalid = null, array $entries = [] ) : array Get metadata information for a mailbox.
set ( string $mailbox, array $data, integer $uidvalid ) Store information in cache.
setMetaData ( string $mailbox, integer $uidvalid, array $data = [] ) Set metadata information for a mailbox.

Method Details

__construct() public méthode

Constructor.
public __construct ( array $params = [] )
$params array Configuration parameters:
  - REQUIRED Parameters:
    - backend: (Horde_Imap_Client_Cache_Backend) The cache backend.
    - baseob: (Horde_Imap_Client_Base) The base client object.

  - Optional Parameters:
    - debug: (Horde_Imap_Client_Base_Debug) Debug object.
             DEFAULT: No debug output

clear() public méthode

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

deleteMailbox() public méthode

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

deleteMsgs() public méthode

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

get() public méthode

Get information from the cache.
public get ( string $mailbox, array $uids = [], array $fields = [], integer $uidvalid = null ) : array
$mailbox string An IMAP mailbox string.
$uids array The list of message UIDs to retrieve information for. If empty, returns the list of cached UIDs.
$fields array An array of fields to retrieve. If empty, returns all cached fields.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
Résultat 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). If $uids is empty, returns the full (unsorted) list of cached UIDs.

getMetaData() public méthode

Get metadata information for a mailbox.
public getMetaData ( string $mailbox, integer $uidvalid = null, 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.
Résultat 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.

set() public méthode

Store information in cache.
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. If empty, do a check to make sure the uidvalidity is still valid.
$uidvalid integer The IMAP uidvalidity value of the mailbox.

setMetaData() public méthode

Set metadata information for a mailbox.
public setMetaData ( string $mailbox, integer $uidvalid, array $data = [] )
$mailbox string An IMAP mailbox string.
$uidvalid integer The IMAP uidvalidity value of the mailbox.
$data array The list of data to save. The keys are the metadata IDs, the values are the associated data. The following labels are reserved: 'uidvalid'.

Property Details

$_backend protected_oe property

Storage backend.
protected Horde_Imap_Client_Cache_Backend $_backend
Résultat Horde_Imap_Client_Cache_Backend

$_baseob protected_oe property

Base client object.
protected Horde_Imap_Client_Base $_baseob
Résultat Horde_Imap_Client_Base

$_debug protected_oe property

Debug output.
protected Horde_Imap_Client_Base_Debug $_debug
Résultat Horde_Imap_Client_Base_Debug

$_params protected_oe property

The configuration params.
protected array $_params
Résultat array