MediaWiki REL1_32
DBAccessBase Class Reference
Inheritance diagram for DBAccessBase:
Collaboration diagram for DBAccessBase:

Public Member Functions

 __construct ( $wiki=false)
 
 getLoadBalancer ()
 Get the database type used for read operations.
 

Protected Member Functions

 getConnection ( $id, $groups=[])
 Returns a database connection.
 
 releaseConnection (IDatabase $db)
 Releases a database connection and makes it available for recycling.
 

Protected Attributes

 $wiki = false
 

Additional Inherited Members

- Public Attributes inherited from IDBAccessObject
const READ_LOCKING = self::READ_LATEST | 2
 Constants for object loading bitfield flags (higher => higher QoS)
 
const READ_NONE = -1
 

Detailed Description

Definition at line 34 of file DBAccessBase.php.

Constructor & Destructor Documentation

◆ __construct()

DBAccessBase::__construct ( $wiki = false)
Parameters
string | bool$wikiThe target wiki's name. This must be an ID that LBFactory can understand.

Definition at line 45 of file DBAccessBase.php.

References $wiki.

Member Function Documentation

◆ getConnection()

DBAccessBase::getConnection ( $id,
$groups = [] )
protected

Returns a database connection.

See also
wfGetDB()
LoadBalancer::getConnection()
Since
1.21
Parameters
int$idWhich connection to use
array$groupsQuery groups
Returns
IDatabase

Definition at line 62 of file DBAccessBase.php.

References getLoadBalancer().

◆ getLoadBalancer()

DBAccessBase::getLoadBalancer ( )

Get the database type used for read operations.

See also
MediaWikiServices::getDBLoadBalancer
Since
1.21
Returns
LoadBalancer The database load balancer object

Definition at line 93 of file DBAccessBase.php.

Referenced by getConnection(), and releaseConnection().

◆ releaseConnection()

DBAccessBase::releaseConnection ( IDatabase $db)
protected

Releases a database connection and makes it available for recycling.

See also
LoadBalancer::reuseConnection()
Since
1.21
Parameters
IDatabase$dbThe database connection to release.

Definition at line 77 of file DBAccessBase.php.

References getLoadBalancer().

Member Data Documentation

◆ $wiki

DBAccessBase::$wiki = false
protected

Definition at line 39 of file DBAccessBase.php.

Referenced by __construct().


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