MediaWiki  1.23.3
EmptyBagOStuff Class Reference

A BagOStuff object with no objects in it. More...

Inheritance diagram for EmptyBagOStuff:
Collaboration diagram for EmptyBagOStuff:

Public Member Functions

 cas ( $casToken, $key, $value, $exp=0)
 
 delete ( $key, $time=0)
 
 get ( $key, &$casToken=null)
 
 merge ( $key, closure $callback, $exptime=0, $attempts=10)
 
 set ( $key, $value, $exp=0)
 
- Public Member Functions inherited from BagOStuff
 add ( $key, $value, $exptime=0)
 
 clearLastError ()
 Clear the "last error" registry. More...
 
 debug ( $text)
 
 decr ( $key, $value=1)
 Decrease stored value of $key by $value while preserving its TTL. More...
 
 deleteObjectsExpiringBefore ( $date, $progressCallback=false)
 Delete all objects expiring before a certain date. More...
 
 getLastError ()
 Get the "last error" registered; clearLastError() should be called manually. More...
 
 getMulti (array $keys)
 Get an associative array containing the item for each of the keys that have items. More...
 
 incr ( $key, $value=1)
 Increase stored value of $key by $value while preserving its TTL. More...
 
 lock ( $key, $timeout=6)
 
 replace ( $key, $value, $exptime=0)
 
 setDebug ( $bool)
 
 unlock ( $key)
 

Additional Inherited Members

- Public Attributes inherited from BagOStuff
const ERR_NO_RESPONSE = 1
 
const ERR_NONE = 0
 Possible values for getLastError() More...
 
const ERR_UNEXPECTED = 3
 
const ERR_UNREACHABLE = 2
 
- Protected Member Functions inherited from BagOStuff
 convertExpiry ( $exptime)
 Convert an optionally relative time to an absolute time. More...
 
 convertToRelative ( $exptime)
 Convert an optionally absolute expiry time to a relative time. More...
 
 isInteger ( $value)
 Check if a value is an integer. More...
 
 mergeViaCas ( $key, closure $callback, $exptime=0, $attempts=10)
 
 mergeViaLock ( $key, closure $callback, $exptime=0, $attempts=10)
 
 setLastError ( $err)
 Set the "last error" registry. More...
 
- Protected Attributes inherited from BagOStuff
 $lastError = self::ERR_NONE
 

Detailed Description

A BagOStuff object with no objects in it.

Used to provide a no-op object to calling code.

Definition at line 29 of file EmptyBagOStuff.php.

Member Function Documentation

◆ cas()

EmptyBagOStuff::cas (   $casToken,
  $key,
  $value,
  $exp = 0 
)
Parameters
$casTokenmixed
$keystring
$valuemixed
$expint
Returns
bool

Reimplemented from BagOStuff.

Definition at line 57 of file EmptyBagOStuff.php.

◆ delete()

EmptyBagOStuff::delete (   $key,
  $time = 0 
)
Parameters
$keystring
$timeint
Returns
bool

Reimplemented from BagOStuff.

Definition at line 66 of file EmptyBagOStuff.php.

◆ get()

EmptyBagOStuff::get (   $key,
$casToken = null 
)
Parameters
$keystring
$casToken[optional]mixed
Returns
bool

Reimplemented from BagOStuff.

Definition at line 36 of file EmptyBagOStuff.php.

◆ merge()

EmptyBagOStuff::merge (   $key,
closure  $callback,
  $exptime = 0,
  $attempts = 10 
)
Parameters
$keystring
$callbackclosure Callback method to be executed
int$exptimeEither an interval in seconds or a unix timestamp for expiry
int$attemptsThe amount of times to attempt a merge in case of failure
Returns
bool success

Reimplemented from BagOStuff.

Definition at line 77 of file EmptyBagOStuff.php.

◆ set()

EmptyBagOStuff::set (   $key,
  $value,
  $exp = 0 
)
Parameters
$keystring
$valuemixed
$expint
Returns
bool

Reimplemented from BagOStuff.

Definition at line 46 of file EmptyBagOStuff.php.


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