MediaWiki REL1_27
DBAccessObjectUtils Class Reference

Helper class for DAO classes. More...

Static Public Member Functions

static getDBOptions ( $bitfield)
 Get an appropriate DB index and options for a query.
 
static hasFlags ( $bitfield, $flags)
 

Detailed Description

Helper class for DAO classes.

Since
1.26

Definition at line 29 of file DBAccessObjectUtils.php.

Member Function Documentation

◆ getDBOptions()

static DBAccessObjectUtils::getDBOptions (   $bitfield)
static

Get an appropriate DB index and options for a query.

Parameters
integer$bitfield
Returns
array (DB_MASTER/DB_SLAVE, SELECT options array)

Definition at line 45 of file DBAccessObjectUtils.php.

References $options, DB_MASTER, DB_SLAVE, hasFlags(), IDBAccessObject\READ_EXCLUSIVE, IDBAccessObject\READ_LATEST, and IDBAccessObject\READ_LOCKING.

Referenced by BotPassword\getPassword(), Revision\getRecentChange(), User\loadFromDatabase(), WikiPage\loadPageData(), and BotPassword\newFromCentralId().

◆ hasFlags()

static DBAccessObjectUtils::hasFlags (   $bitfield,
  $flags 
)
static
Parameters
integer$bitfield
integer$flagsIDBAccessObject::READ_* constant
Returns
bool Bitfield has flag $flag set

Definition at line 35 of file DBAccessObjectUtils.php.

References $flags.

Referenced by getDBOptions(), and User\loadFromId().


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