PHP Класс Horde_Imap_Client_Cache, horde

Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_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.

Открытые методы

Метод Описание
__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.

Описание методов

__construct() публичный Метод

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() публичный Метод

Clear the cache.
С версии: 2.9.0
public clear ( integer $lifetime = null )
$lifetime integer Only delete entries older than this (in seconds). If null, deletes all entries.

deleteMailbox() публичный Метод

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

deleteMsgs() публичный Метод

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() публичный Метод

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.
Результат 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() публичный Метод

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.
Результат 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() публичный Метод

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() публичный Метод

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'.

Описание свойств

$_backend защищенное свойство

Storage backend.
protected Horde_Imap_Client_Cache_Backend $_backend
Результат Horde_Imap_Client_Cache_Backend

$_baseob защищенное свойство

Base client object.
protected Horde_Imap_Client_Base $_baseob
Результат Horde_Imap_Client_Base

$_debug защищенное свойство

Debug output.
protected Horde_Imap_Client_Base_Debug $_debug
Результат Horde_Imap_Client_Base_Debug

$_params защищенное свойство

The configuration params.
protected array $_params
Результат array