MediaWiki  1.23.2
DBAccessBase.php
Go to the documentation of this file.
1 <?php
2 
30 abstract class DBAccessBase implements IDBAccessObject {
35  protected $wiki = false;
36 
41  public function __construct( $wiki = false ) {
42  $this->wiki = $wiki;
43  }
44 
58  protected function getConnection( $id, $groups = array() ) {
59  $loadBalancer = wfGetLB( $this->wiki );
60 
61  return $loadBalancer->getConnection( $id, $groups, $this->wiki );
62  }
63 
73  protected function releaseConnection( DatabaseBase $db ) {
74  if ( $this->wiki !== false ) {
75  $loadBalancer = $this->getLoadBalancer();
76  $loadBalancer->reuseConnection( $db );
77  }
78  }
79 
89  public function getLoadBalancer() {
90  return wfGetLB( $this->wiki );
91  }
92 }
php
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
Definition: skin.txt:62
wfGetLB
wfGetLB( $wiki=false)
Get a load balancer object.
Definition: GlobalFunctions.php:3660
wiki
Prior to maintenance scripts were a hodgepodge of code that had no cohesion or formal method of action Beginning maintenance scripts have been cleaned up to use a unified class Directory structure How to run a script How to write your own DIRECTORY STRUCTURE The maintenance directory of a MediaWiki installation contains several all of which have unique purposes HOW TO RUN A SCRIPT Ridiculously just call php someScript php that s in the top level maintenance directory if not default wiki
Definition: maintenance.txt:1
IDBAccessObject
Interface for database access objects.
Definition: IDBAccessObject.php:47
array
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
DBAccessBase\$wiki
string bool $wiki
$wiki The target wiki's name.
Definition: DBAccessBase.php:34
DBAccessBase
Definition: DBAccessBase.php:30
DatabaseBase
Database abstraction object.
Definition: Database.php:219
DBAccessBase\releaseConnection
releaseConnection(DatabaseBase $db)
Releases a database connection and makes it available for recycling.
Definition: DBAccessBase.php:72
DBAccessBase\getLoadBalancer
getLoadBalancer()
Get the database type used for read operations.
Definition: DBAccessBase.php:88
DBAccessBase\getConnection
getConnection( $id, $groups=array())
Returns a database connection.
Definition: DBAccessBase.php:57
DBAccessBase\__construct
__construct( $wiki=false)
Definition: DBAccessBase.php:40