MediaWiki master
MediaWiki\Site\SiteStore Interface Reference

Interface for storing and retrieving Site objects. More...

Inherits MediaWiki\Site\SiteLookup.

Inherited by MediaWiki\Site\CachingSiteStore, MediaWiki\Site\DBSiteStore, and MediaWiki\Site\HashSiteStore.

Collaboration diagram for MediaWiki\Site\SiteStore:

Public Member Functions

 clear ()
 Deletes all sites from the database.
 
 saveSite (Site $site)
 Saves the provided site.
 
 saveSites (array $sites)
 Saves the provided sites.
 
- Public Member Functions inherited from MediaWiki\Site\SiteLookup
 getSite ( $globalId)
 Return the site with provided global ID, or null if there is no such site.
 
 getSites ()
 Return a list of all sites.
 

Detailed Description

Interface for storing and retrieving Site objects.

Default implementation is DBSiteStore.

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

Definition at line 32 of file SiteStore.php.

Member Function Documentation

◆ clear()

MediaWiki\Site\SiteStore::clear ( )

Deletes all sites from the database.

After calling clear(), getSites() will return an empty list and getSite() will return null until saveSite() or saveSites() is called.

Implemented in MediaWiki\Site\CachingSiteStore, MediaWiki\Site\DBSiteStore, and MediaWiki\Site\HashSiteStore.

◆ saveSite()

MediaWiki\Site\SiteStore::saveSite ( Site $site)

Saves the provided site.

Since
1.21
Parameters
Site$site
Returns
bool Success indicator

Implemented in MediaWiki\Site\CachingSiteStore, MediaWiki\Site\DBSiteStore, and MediaWiki\Site\HashSiteStore.

◆ saveSites()

MediaWiki\Site\SiteStore::saveSites ( array $sites)

Saves the provided sites.

Since
1.21
Parameters
Site[]$sites
Returns
bool Success indicator

Implemented in MediaWiki\Site\CachingSiteStore, MediaWiki\Site\DBSiteStore, and MediaWiki\Site\HashSiteStore.


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