BagOStuff Class Reference
[Cache]

interface is intended to be more or less compatible with the PHP memcached client. More...

Inherited by APCBagOStuff, DBABagOStuff, eAccelBagOStuff, HashBagOStuff, SqlBagOStuff, TurckBagOStuff, and XCacheBagOStuff.

List of all members.

Public Member Functions

 __construct ()
 set_debug ($bool)
 get ($key)
 set ($key, $value, $exptime=0)
 delete ($key, $time=0)
 lock ($key, $timeout=0)
 unlock ($key)
 keys ()
 get_multi ($keys)
 set_multi ($hash, $exptime=0)
 add ($key, $value, $exptime=0)
 add_multi ($hash, $exptime=0)
 delete_multi ($keys, $time=0)
 replace ($key, $value, $exptime=0)
 incr ($key, $value=1)
 decr ($key, $value=1)
 _debug ($text)

Static Public Member Functions

static convertExpiry ($exptime)
 Convert an optionally relative time to an absolute time.

Public Attributes

 $debugmode


Detailed Description

interface is intended to be more or less compatible with the PHP memcached client.

backends for local hash array and SQL table included: $bag = new HashBagOStuff(); $bag = new MediaWikiBagOStuff($tablename); # connect to db first

Definition at line 40 of file BagOStuff.php.


Constructor & Destructor Documentation

BagOStuff::__construct (  ) 

Reimplemented in HashBagOStuff.

Definition at line 43 of file BagOStuff.php.

References set_debug().


Member Function Documentation

BagOStuff::_debug ( text  ) 

Definition at line 153 of file BagOStuff.php.

References wfDebug().

Referenced by SqlBagOStuff::_query(), SqlBagOStuff::get(), and SqlBagOStuff::keys().

BagOStuff::add ( key,
value,
exptime = 0 
)

Reimplemented in DBABagOStuff.

Definition at line 98 of file BagOStuff.php.

References $key.

Referenced by add_multi().

BagOStuff::add_multi ( hash,
exptime = 0 
)

Definition at line 105 of file BagOStuff.php.

References $key, and add().

static BagOStuff::convertExpiry ( exptime  )  [static]

Convert an optionally relative time to an absolute time.

Definition at line 161 of file BagOStuff.php.

Referenced by DBABagOStuff::encode(), and HashBagOStuff::set().

BagOStuff::decr ( key,
value = 1 
)

Definition at line 136 of file BagOStuff.php.

References $key, $n, lock(), and unlock().

BagOStuff::delete ( key,
time = 0 
)

BagOStuff::delete_multi ( keys,
time = 0 
)

Definition at line 110 of file BagOStuff.php.

References $key, and $keys.

BagOStuff::get ( key  ) 

BagOStuff::get_multi ( keys  ) 

Definition at line 86 of file BagOStuff.php.

References $key, $keys, and $out.

BagOStuff::incr ( key,
value = 1 
)

Definition at line 120 of file BagOStuff.php.

References $key, $n, lock(), and unlock().

BagOStuff::keys (  ) 

Reimplemented in HashBagOStuff, SqlBagOStuff, and DBABagOStuff.

Definition at line 79 of file BagOStuff.php.

BagOStuff::lock ( key,
timeout = 0 
)

Reimplemented in TurckBagOStuff, and eAccelBagOStuff.

Definition at line 69 of file BagOStuff.php.

Referenced by decr(), and incr().

BagOStuff::replace ( key,
value,
exptime = 0 
)

Definition at line 115 of file BagOStuff.php.

References $key.

BagOStuff::set ( key,
value,
exptime = 0 
)

BagOStuff::set_debug ( bool  ) 

Definition at line 47 of file BagOStuff.php.

Referenced by __construct().

BagOStuff::set_multi ( hash,
exptime = 0 
)

Definition at line 93 of file BagOStuff.php.

References $key.

BagOStuff::unlock ( key  ) 

Reimplemented in TurckBagOStuff, and eAccelBagOStuff.

Definition at line 74 of file BagOStuff.php.

Referenced by decr(), and incr().


Member Data Documentation

BagOStuff::$debugmode

Definition at line 41 of file BagOStuff.php.


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:33 2009 for MediaWiki by  doxygen 1.5.9