MediaWiki 1.40.4
DBSiteStore Class Reference

Holds a list of sites stored in the database. More...

Inherits SiteStore.

Collaboration diagram for DBSiteStore:

Public Member Functions

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

Protected Member Functions

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

Protected Attributes

SiteList null $sites = null
 

Detailed Description

Holds a list of sites stored in the database.

Since
1.25
Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
Daniel Kinzler

Definition at line 31 of file DBSiteStore.php.

Constructor & Destructor Documentation

◆ __construct()

DBSiteStore::__construct ( ILoadBalancer $dbLoadBalancer)
Since
1.27
Parameters
ILoadBalancer$dbLoadBalancer

Definition at line 41 of file DBSiteStore.php.

Member Function Documentation

◆ clear()

DBSiteStore::clear ( )

Clears the list of sites stored in the database.

See also
SiteStore::clear()
Returns
bool Success

Implements SiteStore.

Definition at line 252 of file DBSiteStore.php.

References DB_PRIMARY, and reset().

◆ getSite()

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

Implements SiteLookup.

Definition at line 131 of file DBSiteStore.php.

References getSites().

◆ getSites()

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

Implements SiteLookup.

Definition at line 51 of file DBSiteStore.php.

References $sites, and loadSites().

Referenced by getSite().

◆ loadSites()

DBSiteStore::loadSites ( )
protected

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

Since
1.25

Definition at line 62 of file DBSiteStore.php.

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

Referenced by getSites().

◆ reset()

DBSiteStore::reset ( )

Resets the SiteList.

Since
1.25

Definition at line 241 of file DBSiteStore.php.

Referenced by clear(), and saveSites().

◆ saveSite()

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

Implements SiteStore.

Definition at line 146 of file DBSiteStore.php.

References saveSites().

◆ saveSites()

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

Implements SiteStore.

Definition at line 157 of file DBSiteStore.php.

References $sites, $success, DB_PRIMARY, and reset().

Referenced by saveSite().

Member Data Documentation

◆ $sites

SiteList null DBSiteStore::$sites = null
protected

Definition at line 33 of file DBSiteStore.php.

Referenced by getSites(), and saveSites().


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