Class IMP_MessageCache

Description

The IMP_MessageCache:: class contains all functions related to caching information about RFC 2822 messages across sessions.

$Horde: imp/lib/IMAP/MessageCache.php,v 1.1.2.13 2009/01/06 15:24:05 jan Exp $

Copyright 2005-2009 The Horde Project (http://www.horde.org/)

See the enclosed file COPYING for license information (GPL). If you did not receive this file, see http://www.fsf.org/copyleft/gpl.html.

Located in /lib/IMAP/MessageCache.php (line 21)


	
			
Variable Summary
 Horde_Cache $_cache
 array $_data
 array $_loaded
 array $_save
 array $_slicemap
 integer $_slicesize
Method Summary
 IMP_MessageCache IMP_MessageCache ()
 void deleteMboxes (array $mboxes)
 void deleteMsgs (string $mailbox, array $uids)
 array retrieve (string $mailbox, array $uids, [integer $mask = 0])
 mixed &singleton ()
 void updateFlags (string $mailbox, array $uids, array $flags, boolean $set)
Variables
Horde_Cache $_cache (line 28)

The Horde_Cache object to use.

array $_data = array() (line 43)

The working data for the current pageload. All changes take place to this data.

array $_loaded = array() (line 50)

The list of cache slices loaded.

array $_save (line 35)

The list of items to save on shutdown.

array $_slicemap = array() (line 57)

The mapping of UIDs to slices.

integer $_slicesize = 100 (line 64)

The default slicesize to use.

Methods
Constructor IMP_MessageCache (line 90)

Constructor.

IMP_MessageCache IMP_MessageCache ()
deleteMboxes (line 766)

Deletes mailboxes from the cache.

void deleteMboxes (array $mboxes)
  • array $mboxes: The list of mailboxes to delete.
deleteMsgs (line 627)

Delete messages in the cache.

void deleteMsgs (string $mailbox, array $uids)
  • string $mailbox: The mailbox.
  • array $uids: The list of message UIDs to delete.
retrieve (line 221)

Retrieve the imap overview information for the given mailbox and message IDs.

  • return: An array of stdClass objects with the UID of the message as the key; the stdClass objects contain the fields requested via the $mask parameter or false if the UID does not exist on the server.
array retrieve (string $mailbox, array $uids, [integer $mask = 0])
  • string $mailbox: An IMAP mailbox string.
  • array $uids: The list of message IDS to retrieve overview information for.
  • integer $mask: A bitmask indicating the fields that should be added to the message data. The bitmasks are as follows:
     1 =  imap_fetch_overview() information
           FIELDS: subject, from, to, date, message_id, references,
                   in_reply_to, size, uid, flagged, answered, deleted, seen,
                   draft
     2 =   IMAP mailbox arrival information
           FIELDS: msgno
           NOTE: This option ALWAYS requires an access to the IMAP server to
                 obtain the message list (sorted by arrival).
     4 =   Mailbox information
           FIELDS: mailbox
     8 =   Mesage structure information (MIME_Message:: object)
           FIELDS: structure
     16 =  Cached preview data (using prefs value)
           FIELDS: preview
     32 =  Header information (IMP_Headers:: object)
           FIELDS: header
     64 =  Cached preview data (overrides prefs value)
           FIELDS: preview
     128 = Cached IMP_UI_Mailbox::getFrom() data
           FIELDS: getfrom
singleton (line 76)

Attempts to return a reference to a concrete IMP_MessageCache instance.

It will only create a new instance if no IMP_MessageCache instance with the same parameters currently exists.

This method must be invoked as: $var = &IMP_MessageCache::singleton();

  • return: The created concrete IMP_MessageCache instance, or false on error.
mixed &singleton ()
updateFlags (line 598)

Update message flags in the cache.

void updateFlags (string $mailbox, array $uids, array $flags, boolean $set)
  • string $mailbox: The mailbox.
  • array $uids: The list of message UIDs to update.
  • array $flags: The flags to set. Valid arguments: seen, deleted, flagged, answered, draft
  • boolean $set: True to set the flag, false to clear flag.

Documentation generated on Sun, 30 Jan 2011 05:28:15 +0000 by phpDocumentor 1.4.3