MediaWiki REL1_30
|
Provides a file-based cache of a SiteStore. More...
Public Member Functions | |
__construct ( $cacheFile) | |
getSite ( $globalId) | |
getSites () | |
Private Member Functions | |
loadJsonFile () | |
loadSitesFromCache () | |
newSiteFromArray (array $data) | |
Private Attributes | |
string | $cacheFile |
SiteList | $sites = null |
Provides a file-based cache of a SiteStore.
The sites are stored in a json file. (see docs/sitescache.txt regarding format)
The cache can be built with the rebuildSitesCache.php maintenance script, and a MediaWiki instance can be setup to use this by setting the 'wgSitesCacheFile' configuration to the cache file location.
Definition at line 33 of file FileBasedSiteLookup.php.
FileBasedSiteLookup::__construct | ( | $cacheFile | ) |
string | $cacheFile |
Definition at line 48 of file FileBasedSiteLookup.php.
References $cacheFile.
FileBasedSiteLookup::getSite | ( | $globalId | ) |
string | $globalId |
Implements SiteLookup.
Definition at line 72 of file FileBasedSiteLookup.php.
References $sites, SiteList\getSite(), getSites(), and SiteList\hasSite().
FileBasedSiteLookup::getSites | ( | ) |
Implements SiteLookup.
Definition at line 57 of file FileBasedSiteLookup.php.
References $sites, and loadSitesFromCache().
Referenced by getSite().
|
private |
MWException |
Definition at line 98 of file FileBasedSiteLookup.php.
Referenced by loadSitesFromCache().
|
private |
Definition at line 81 of file FileBasedSiteLookup.php.
References $sites, loadJsonFile(), and newSiteFromArray().
Referenced by getSites().
|
private |
array | $data |
Definition at line 120 of file FileBasedSiteLookup.php.
References Site\newForType(), and Site\TYPE_UNKNOWN.
Referenced by loadSitesFromCache().
|
private |
Definition at line 43 of file FileBasedSiteLookup.php.
Referenced by __construct().
|
private |
Definition at line 38 of file FileBasedSiteLookup.php.
Referenced by getSite(), getSites(), and loadSitesFromCache().