MediaWiki  1.28.0
DBSiteStore Class Reference
Inheritance diagram for DBSiteStore:
Collaboration diagram for DBSiteStore:

Public Member Functions

 __construct (LoadBalancer $dbLoadBalancer)
 
 clear ()
 Clears the list of sites stored in the database. More...
 
 getSite ($globalId)
 
 getSites ()
 
 reset ()
 Resets the SiteList. More...
 
 saveSite (Site $site)
 
 saveSites (array $sites)
 

Protected Member Functions

 loadSites ()
 Fetches the site from the database and loads them into the sites field. More...
 

Protected Attributes

SiteList null $sites = null
 

Private Attributes

LoadBalancer $dbLoadBalancer
 

Detailed Description

Definition at line 31 of file DBSiteStore.php.

Constructor & Destructor Documentation

DBSiteStore::__construct ( LoadBalancer  $dbLoadBalancer)
Since
1.27
Todo:
: inject some kind of connection manager that is aware of the target wiki, instead of injecting a LoadBalancer.
Parameters
LoadBalancer$dbLoadBalancer

Definition at line 51 of file DBSiteStore.php.

References $dbLoadBalancer.

Member Function Documentation

DBSiteStore::clear ( )

Clears the list of sites stored in the database.

See also
SiteStore::clear()
Returns
bool Success

Implements SiteStore.

Definition at line 271 of file DBSiteStore.php.

References DB_MASTER, and reset().

DBSiteStore::getSite (   $globalId)
See also
SiteStore::getSite
Since
1.25
Parameters
string$globalId
Returns
Site|null

Implements SiteLookup.

Definition at line 144 of file DBSiteStore.php.

References getSites().

DBSiteStore::getSites ( )
See also
SiteStore::getSites
Since
1.25
Returns
SiteList

Implements SiteLookup.

Definition at line 62 of file DBSiteStore.php.

References $sites, and loadSites().

Referenced by getSite().

DBSiteStore::loadSites ( )
protected

Fetches the site from the database and loads them into the sites field.

Since
1.25

Definition at line 73 of file DBSiteStore.php.

References $dbr, $res, as, DB_REPLICA, Site\newForType(), and unserialize().

Referenced by getSites().

DBSiteStore::reset ( )

Resets the SiteList.

Since
1.25

Definition at line 260 of file DBSiteStore.php.

Referenced by clear(), and saveSites().

DBSiteStore::saveSite ( Site  $site)
See also
SiteStore::saveSite
Since
1.25
Parameters
Site$site
Returns
bool Success indicator

Implements SiteStore.

Definition at line 161 of file DBSiteStore.php.

References saveSites().

DBSiteStore::saveSites ( array  $sites)
See also
SiteStore::saveSites
Since
1.25
Parameters
Site[]$sites
Returns
bool Success indicator

Implements SiteStore.

Definition at line 174 of file DBSiteStore.php.

References $success, as, DB_MASTER, reset(), and serialize().

Referenced by saveSite().

Member Data Documentation

LoadBalancer DBSiteStore::$dbLoadBalancer
private

Definition at line 41 of file DBSiteStore.php.

Referenced by __construct().

SiteList null DBSiteStore::$sites = null
protected

Definition at line 36 of file DBSiteStore.php.

Referenced by getSites().


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