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

Public Member Functions

 __construct ( $dbDomain=false)
 

Protected Member Functions

 getConnection ( $id, array $groups=[])
 Returns a database connection.
 
 getLoadBalancer ()
 Get the database type used for read operations.
 
 releaseConnection (IDatabase $db)
 Releases a database connection and makes it available for recycling.
 

Protected Attributes

string bool $dbDomain = false
 The target wiki's DB domain.
 

Private Attributes

ILoadBalancer $lb
 

Additional Inherited Members

- Public Attributes inherited from IDBAccessObject
const READ_NONE = -1
 Constants for object loading bitfield flags (higher => higher QoS)
 

Detailed Description

Definition at line 39 of file DBAccessBase.php.

Constructor & Destructor Documentation

◆ __construct()

DBAccessBase::__construct (   $dbDomain = false)
Parameters
string | bool$dbDomainThe target wiki's DB domain

Definition at line 49 of file DBAccessBase.php.

References $dbDomain, and wfDeprecated().

Member Function Documentation

◆ getConnection()

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

Returns a database connection.

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

Definition at line 69 of file DBAccessBase.php.

References getLoadBalancer().

◆ getLoadBalancer()

DBAccessBase::getLoadBalancer ( )
protected

Get the database type used for read operations.

See also
MediaWikiServices::getInstance()->getDBLoadBalancer
Since
1.21
Returns
ILoadBalancer The database load balancer object

Definition at line 96 of file DBAccessBase.php.

References $lb.

Referenced by getConnection().

◆ 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.
Deprecated:
Since 1.34

Definition at line 83 of file DBAccessBase.php.

Member Data Documentation

◆ $dbDomain

string bool DBAccessBase::$dbDomain = false
protected

The target wiki's DB domain.

Definition at line 44 of file DBAccessBase.php.

Referenced by __construct().

◆ $lb

ILoadBalancer DBAccessBase::$lb
private

Definition at line 41 of file DBAccessBase.php.

Referenced by getLoadBalancer().


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