MediaWiki
REL1_22
|
Public Member Functions | |
clear () | |
Clears the list of sites stored in the database. | |
getSite ($globalId, $source= 'cache') | |
getSites ($source= 'cache') | |
reset () | |
Purges the internal and external cache of the site list, forcing the list of sites to be re-read from the database. | |
saveSite (Site $site) | |
saveSites (array $sites) | |
Static Public Member Functions | |
static | newInstance (ORMTable $sitesTable=null) |
Protected Member Functions | |
__construct (ORMTable $sitesTable=null) | |
Constructor. | |
getCacheKey () | |
Constructs a cache key to use for caching the list of sites. | |
getRowFromSite (Site $site) | |
Get a new ORMRow from a Site object. | |
loadSites () | |
Fetches the site from the database and loads them into the sites field. | |
newSitesTable () | |
siteFromRow (ORMRow $siteRow) | |
Returns a new Site object constructed from the provided ORMRow. | |
Protected Attributes | |
SiteList null | $sites = null |
ORMTable | $sitesTable |
Private Attributes | |
string null | $cacheKey = null |
int | $cacheTimeout = 3600 |
Definition at line 31 of file SiteSQLStore.php.
SiteSQLStore::__construct | ( | ORMTable $ | sitesTable = null | ) | [protected] |
Constructor.
ORMTable | null | $sitesTable |
Definition at line 69 of file SiteSQLStore.php.
Clears the list of sites stored in the database.
Implements SiteStore.
Definition at line 391 of file SiteSQLStore.php.
SiteSQLStore::getCacheKey | ( | ) | [protected] |
Constructs a cache key to use for caching the list of sites.
This includes the concrete class name of the site list as well as a version identifier for the list's serialization, to avoid problems when unserializing site lists serialized by an older version, e.g. when reading from a cache.
The cache key also includes information about where the sites were loaded from, e.g. the name of a database table.
Definition at line 91 of file SiteSQLStore.php.
SiteSQLStore::getRowFromSite | ( | Site $ | site | ) | [protected] |
SiteSQLStore::getSite | ( | $ | globalId, |
$ | source = 'cache' |
||
) |
string | $globalId | |
string | $source |
Implements SiteStore.
Definition at line 270 of file SiteSQLStore.php.
SiteSQLStore::getSites | ( | $ | source = 'cache' | ) |
string | $source | either 'cache' or 'recache' |
Implements SiteStore.
Definition at line 118 of file SiteSQLStore.php.
SiteSQLStore::loadSites | ( | ) | [protected] |
Fetches the site from the database and loads them into the sites field.
Definition at line 225 of file SiteSQLStore.php.
static SiteSQLStore::newInstance | ( | ORMTable $ | sitesTable = null | ) | [static] |
ORMTable | null | $sitesTable |
Definition at line 58 of file SiteSQLStore.php.
Referenced by TestSites\insertIntoDb(), SiteSQLStoreTest\testClear(), SiteSQLStoreTest\testGetSites(), SiteSQLStoreTest\testReset(), and SiteSQLStoreTest\testSaveSites().
SiteSQLStore::newSitesTable | ( | ) | [protected] |
Purges the internal and external cache of the site list, forcing the list of sites to be re-read from the database.
Definition at line 374 of file SiteSQLStore.php.
SiteSQLStore::saveSite | ( | Site $ | site | ) |
Site | $site |
Implements SiteStore.
Definition at line 288 of file SiteSQLStore.php.
SiteSQLStore::saveSites | ( | array $ | sites | ) |
Site[] | $sites |
Implements SiteStore.
Definition at line 301 of file SiteSQLStore.php.
SiteSQLStore::siteFromRow | ( | ORMRow $ | siteRow | ) | [protected] |
string null SiteSQLStore::$cacheKey = null [private] |
Definition at line 45 of file SiteSQLStore.php.
int SiteSQLStore::$cacheTimeout = 3600 [private] |
Definition at line 49 of file SiteSQLStore.php.
Definition at line 37 of file SiteSQLStore.php.
ORMTable SiteSQLStore::$sitesTable [protected] |
Definition at line 41 of file SiteSQLStore.php.