MediaWiki REL1_39
LCStoreDB Class Reference

LCStore implementation which uses the standard DB functions to store data. More...

Inheritance diagram for LCStoreDB:
Collaboration diagram for LCStoreDB:

Public Member Functions

 __construct ( $params)
 
 finishWrite ()
 Finish a write transaction.
 
 get ( $code, $key)
 Get a value.
 
 set ( $key, $value)
 Set a key to a given value.
 
 startWrite ( $code)
 Start a write transaction.
 

Detailed Description

LCStore implementation which uses the standard DB functions to store data.

Definition at line 31 of file LCStoreDB.php.

Constructor & Destructor Documentation

◆ __construct()

LCStoreDB::__construct ( $params)

Definition at line 47 of file LCStoreDB.php.

Member Function Documentation

◆ finishWrite()

◆ get()

LCStoreDB::get ( $code,
$key )

Get a value.

Parameters
string$codeLanguage code
string$keyCache key

Implements LCStore.

Definition at line 51 of file LCStoreDB.php.

References DB_REPLICA, unserialize(), and wfGetDB().

◆ set()

LCStoreDB::set ( $key,
$value )

Set a key to a given value.

startWrite() must be called before this is called, and finishWrite() must be called afterwards.

Parameters
string$key
mixed$value

Implements LCStore.

Definition at line 115 of file LCStoreDB.php.

References Wikimedia\Rdbms\IDatabase\encodeBlob(), and serialize().

◆ startWrite()

LCStoreDB::startWrite ( $code)

Start a write transaction.

Parameters
string$codeLanguage code

Implements LCStore.

Definition at line 71 of file LCStoreDB.php.

References Wikimedia\Rdbms\IDatabase\isReadOnly().


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