SqlBagOStuff Class Reference
[Cache]

Generic class to store objects in a database. More...

Inherits BagOStuff.

Inherited by MediaWikiBagOStuff.

List of all members.

Public Member Functions

 __construct ($tablename= 'objectcache')
 Constructor.
 get ($key)
 set ($key, $value, $exptime=0)
 delete ($key, $time=0)
 keys ()
 getTableName ()
 _query ($sql)
 _strencode ($str)
 _blobencode ($str)
 _blobdecode ($str)
 _doinsert ($table, $vals)
 _doquery ($sql)
 _readonly ()
 _begin ()
 _commit ()
 _freeresult ($result)
 _dberror ($result)
 _maxdatetime ()
 _fromunixtime ($ts)
 garbageCollect ()
 expireall ()
 deleteall ()
 _serialize (&$data)
 Serialize an object and, if possible, compress the representation.
 _unserialize ($serial)
 Unserialize and, if necessary, decompress an object.

Public Attributes

 $table
 $lastexpireall = 0


Detailed Description

Generic class to store objects in a database.

Definition at line 222 of file BagOStuff.php.


Constructor & Destructor Documentation

SqlBagOStuff::__construct ( tablename = 'objectcache'  ) 

Constructor.

Parameters:
$tablename String: name of the table to use

Definition at line 231 of file BagOStuff.php.

References table.


Member Function Documentation

SqlBagOStuff::_begin (  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 347 of file BagOStuff.php.

Referenced by delete(), deleteall(), expireall(), and set().

SqlBagOStuff::_blobdecode ( str  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 338 of file BagOStuff.php.

Referenced by get().

SqlBagOStuff::_blobencode ( str  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 335 of file BagOStuff.php.

Referenced by set().

SqlBagOStuff::_commit (  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 348 of file BagOStuff.php.

Referenced by delete(), deleteall(), expireall(), and set().

SqlBagOStuff::_dberror ( result  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 355 of file BagOStuff.php.

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

SqlBagOStuff::_doinsert ( table,
vals 
) [abstract]

Reimplemented in MediaWikiBagOStuff.

Referenced by set().

SqlBagOStuff::_doquery ( sql  )  [abstract]

Reimplemented in MediaWikiBagOStuff.

Referenced by _query().

SqlBagOStuff::_freeresult ( result  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 350 of file BagOStuff.php.

SqlBagOStuff::_fromunixtime ( ts  )  [abstract]

Reimplemented in MediaWikiBagOStuff.

Referenced by expireall(), and set().

SqlBagOStuff::_maxdatetime (  )  [abstract]

Reimplemented in MediaWikiBagOStuff.

Referenced by set().

SqlBagOStuff::_query ( sql  ) 

Definition at line 314 of file BagOStuff.php.

References $i, $res, $sql, _dberror(), BagOStuff::_debug(), _doquery(), _strencode(), and getTableName().

Referenced by delete(), deleteall(), expireall(), get(), keys(), and set().

SqlBagOStuff::_readonly (  )  [abstract]

Reimplemented in MediaWikiBagOStuff.

Referenced by delete(), deleteall(), expireall(), and set().

SqlBagOStuff::_serialize ( &$  data  ) 

Serialize an object and, if possible, compress the representation.

On typical message and page data, this can provide a 3X decrease in storage requirements.

Parameters:
$data mixed
Returns:
string

Definition at line 404 of file BagOStuff.php.

Referenced by set().

SqlBagOStuff::_strencode ( str  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 331 of file BagOStuff.php.

Referenced by _query().

SqlBagOStuff::_unserialize ( serial  ) 

Unserialize and, if necessary, decompress an object.

Parameters:
$serial string
Returns:
mixed

Definition at line 418 of file BagOStuff.php.

Referenced by get().

SqlBagOStuff::delete ( key,
time = 0 
)

Reimplemented from BagOStuff.

Definition at line 286 of file BagOStuff.php.

References $key, _begin(), _commit(), _query(), and _readonly().

SqlBagOStuff::deleteall (  ) 

Definition at line 386 of file BagOStuff.php.

References _begin(), _commit(), _query(), and _readonly().

SqlBagOStuff::expireall (  ) 

Definition at line 375 of file BagOStuff.php.

References _begin(), _commit(), _fromunixtime(), _query(), and _readonly().

Referenced by garbageCollect().

SqlBagOStuff::garbageCollect (  ) 

Definition at line 363 of file BagOStuff.php.

References expireall().

Referenced by get().

SqlBagOStuff::get ( key  ) 

Reimplemented from BagOStuff.

Definition at line 235 of file BagOStuff.php.

References $key, $res, $row, _blobdecode(), _dberror(), BagOStuff::_debug(), _query(), _unserialize(), garbageCollect(), and wfTimestamp().

SqlBagOStuff::getTableName (  ) 

Reimplemented in MediaWikiBagOStuff.

Definition at line 310 of file BagOStuff.php.

References table.

Referenced by _query(), and set().

SqlBagOStuff::keys (  ) 

Reimplemented from BagOStuff.

Definition at line 297 of file BagOStuff.php.

References $res, $result, $row, _dberror(), BagOStuff::_debug(), and _query().

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


Member Data Documentation

SqlBagOStuff::$lastexpireall = 0

Definition at line 224 of file BagOStuff.php.

SqlBagOStuff::$table

Definition at line 223 of file BagOStuff.php.


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

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