MediaWiki  1.23.2
SiteStore Interface Reference
Inheritance diagram for SiteStore:

Public Member Functions

 clear ()
 Deletes all sites from the database. More...
 
 getSite ( $globalId, $source='cache')
 Returns the site with provided global id, or null if there is no such site. More...
 
 getSites ( $source='cache')
 Returns a list of all sites. More...
 
 saveSite (Site $site)
 Saves the provided site. More...
 
 saveSites (array $sites)
 Saves the provided sites. More...
 

Detailed Description

Definition at line 29 of file SiteStore.php.

Member Function Documentation

◆ clear()

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 SiteSQLStore.

◆ getSite()

SiteStore::getSite (   $globalId,
  $source = 'cache' 
)

Returns the site with provided global id, or null if there is no such site.

Since
1.21
Parameters
string$globalId
string$sourceeither 'cache' or 'recache'. If 'cache', the values are allowed (but not obliged) to come from a cache.
Returns
Site|null

Implemented in SiteSQLStore.

◆ getSites()

SiteStore::getSites (   $source = 'cache')

Returns a list of all sites.

By default this site is fetched from the cache, which can be changed to loading the list from the database using the $useCache parameter.

Since
1.21
Parameters
string$sourceeither 'cache' or 'recache'. If 'cache', the values are allowed (but not obliged) to come from a cache.
Returns
SiteList

Implemented in SiteSQLStore.

◆ saveSite()

SiteStore::saveSite ( Site  $site)

Saves the provided site.

Since
1.21
Parameters
Site$site
Returns
boolean Success indicator

Implemented in SiteSQLStore.

◆ saveSites()

SiteStore::saveSites ( array  $sites)

Saves the provided sites.

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

Implemented in SiteSQLStore.


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