MediaWiki master
MediaWiki\Site\DBSiteStore Class Reference

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

Inherits MediaWiki\Site\SiteStore.

Collaboration diagram for MediaWiki\Site\DBSiteStore:

Public Member Functions

 __construct (IConnectionProvider $dbProvider)
 
 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 34 of file DBSiteStore.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Site\DBSiteStore::__construct ( IConnectionProvider $dbProvider)
Since
1.27
Parameters
IConnectionProvider$dbProvider

Definition at line 44 of file DBSiteStore.php.

Member Function Documentation

◆ clear()

MediaWiki\Site\DBSiteStore::clear ( )

Clears the list of sites stored in the database.

See also
SiteStore::clear()

Implements MediaWiki\Site\SiteStore.

Definition at line 242 of file DBSiteStore.php.

References MediaWiki\Site\DBSiteStore\reset().

◆ getSite()

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

Implements MediaWiki\Site\SiteLookup.

Definition at line 126 of file DBSiteStore.php.

References MediaWiki\Site\DBSiteStore\getSites().

◆ getSites()

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

Implements MediaWiki\Site\SiteLookup.

Definition at line 54 of file DBSiteStore.php.

References MediaWiki\Site\DBSiteStore\$sites, and MediaWiki\Site\DBSiteStore\loadSites().

Referenced by MediaWiki\Site\DBSiteStore\getSite().

◆ loadSites()

MediaWiki\Site\DBSiteStore::loadSites ( )
protected

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

Since
1.25

Definition at line 65 of file DBSiteStore.php.

References MediaWiki\Site\Site\newForType().

Referenced by MediaWiki\Site\DBSiteStore\getSites().

◆ reset()

MediaWiki\Site\DBSiteStore::reset ( )

Resets the SiteList.

Since
1.25

Definition at line 233 of file DBSiteStore.php.

Referenced by MediaWiki\Site\DBSiteStore\clear(), and MediaWiki\Site\DBSiteStore\saveSites().

◆ saveSite()

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

Implements MediaWiki\Site\SiteStore.

Definition at line 141 of file DBSiteStore.php.

References MediaWiki\Site\DBSiteStore\saveSites().

◆ saveSites()

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

Implements MediaWiki\Site\SiteStore.

Definition at line 152 of file DBSiteStore.php.

References MediaWiki\Site\DBSiteStore\$sites, and MediaWiki\Site\DBSiteStore\reset().

Referenced by MediaWiki\Site\DBSiteStore\saveSite().

Member Data Documentation

◆ $sites

SiteList null MediaWiki\Site\DBSiteStore::$sites = null
protected

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