Class IMAP_Cache

Description

The IMAP_Cache:: class facilitates in caching output from the PHP imap extension in the current session.

$Horde: framework/IMAP/IMAP/Cache.php,v 1.4.12.15 2009/01/06 15:23:11 jan Exp $

Copyright 2003-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 /IMAP/IMAP/Cache.php (line 17)


	
			
Variable Summary
 array $_cache
Method Summary
 IMAP_Cache IMAP_Cache ()
 boolean checkCache (resource $imap, string $mailbox, [boolean $update = false])
 mixed getCache (resource $imap, string $mailbox, [string $key = null], [boolean $check = true])
 stdClass getStatus (resource $imap, string $mailbox)
 void storeCache (resource $imap, string $mailbox, [array $values = array()])
Variables
array $_cache (line 24)

Pointer to the session cache.

array $_statuscache = array() (line 31)

The cached results of imap_status() calls.

Methods
Constructor IMAP_Cache (line 56)

Constructor

IMAP_Cache IMAP_Cache ()
checkCache (line 100)

Is the cache information up-to-date?

  • return: True if cache information up-to-date, false if not.
boolean checkCache (resource $imap, string $mailbox, [boolean $update = false])
  • resource $imap: The IMAP resource stream.
  • string $mailbox: The full ({hostname}mailbox) mailbox name.
  • boolean $update: Should the cache ID string be updated?
getCache (line 74)

Get data from the cache.

  • return: The data requested, or false if not available.
mixed getCache (resource $imap, string $mailbox, [string $key = null], [boolean $check = true])
  • resource $imap: The IMAP resource stream.
  • string $mailbox: The full ({hostname}mailbox) mailbox name.
  • string $key: The name of a specific entry to return.
  • boolean $check: Check for updated mailbox?
getStatus (line 144)

Returns and caches the results of an imap_status() call.

  • return: The imap_status() object or the empty string.
  • since: Horde 3.1.2
stdClass getStatus (resource $imap, string $mailbox)
  • resource $imap: The IMAP resource string.
  • string $mailbox: The full ({hostname}mailbox) mailbox name.
singleton (line 42)

Returns a reference to the global IMAP_Cache object, only creating it if it doesn't already exist.

This method must be invoked as: $imap_cache = &IMAP_Cache::singleton();

  • return: The IMAP_Cache instance.
IMAP_Cache &singleton ()
storeCache (line 122)

Store data in the cache.

void storeCache (resource $imap, string $mailbox, [array $values = array()])
  • resource $imap: The IMAP resource stream.
  • string $mailbox: The full ({hostname}mailbox) mailbox name.
  • array $values: The data to add to the cache.

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