Handles DB operations for Translatable pages, and the related cache. More...
Public Member Functions | |
__construct (IDatabase $db, MessageGroupWANCache $cache) | |
getGroups () | |
Return the WikiPageMessageGroups If local variable is set, use that otherwise fetch from the cache. | |
recache () | |
Clear and refill the cache with the latest values. | |
clearCache () | |
Clear values from the cache. | |
getCacheData () | |
Get the data that needs to be stored in the cache. | |
Public Member Functions inherited from MessageGroupLoader | |
isExpired (DependencyWrapper $wrapper) | |
Determines if dependencies have expired. | |
Static Public Member Functions | |
static | registerLoader (array &$groupLoader, array $deps) |
Hook: TranslateInitGroupLoaders. | |
static | getInstance (IDatabase $db=null, WANObjectCache $cache=null) |
Return an instance of this class using the parameters, if passed, else initialize the necessary dependencies and return an instance. | |
Protected Member Functions | |
clearProcessCache () | |
Clears the process cache, mainly the cached groups property. | |
getTranslatablePageTitles () | |
Fetch page titles marked for translation from the database to store in the cache. | |
initGroupsFromTitle ( $titles) | |
Convert page titles to WikiPageMessageGroup objects. | |
Protected Attributes | |
$db | |
$cache | |
$groups | |
Handles DB operations for Translatable pages, and the related cache.
Definition at line 19 of file TranslatablePageMessageGroupStore.php.
TranslatablePageMessageGroupStore::__construct | ( | IDatabase | $db, |
MessageGroupWANCache | $cache ) |
Definition at line 36 of file TranslatablePageMessageGroupStore.php.
TranslatablePageMessageGroupStore::clearCache | ( | ) |
Clear values from the cache.
Implements CachedMessageGroupLoader.
Definition at line 80 of file TranslatablePageMessageGroupStore.php.
|
protected |
Clears the process cache, mainly the cached groups property.
Definition at line 88 of file TranslatablePageMessageGroupStore.php.
TranslatablePageMessageGroupStore::getCacheData | ( | ) |
Get the data that needs to be stored in the cache.
Definition at line 97 of file TranslatablePageMessageGroupStore.php.
TranslatablePageMessageGroupStore::getGroups | ( | ) |
Return the WikiPageMessageGroups If local variable is set, use that otherwise fetch from the cache.
Reimplemented from MessageGroupLoader.
Definition at line 55 of file TranslatablePageMessageGroupStore.php.
|
static |
Return an instance of this class using the parameters, if passed, else initialize the necessary dependencies and return an instance.
IDatabase | null | $db | |
WANObjectCache | null | $cache |
Definition at line 133 of file TranslatablePageMessageGroupStore.php.
|
protected |
Fetch page titles marked for translation from the database to store in the cache.
Definition at line 148 of file TranslatablePageMessageGroupStore.php.
|
protected |
Convert page titles to WikiPageMessageGroup objects.
Called after the values have been retrieved from the cache.
string[] | $titles |
Definition at line 171 of file TranslatablePageMessageGroupStore.php.
TranslatablePageMessageGroupStore::recache | ( | ) |
Clear and refill the cache with the latest values.
Implements CachedMessageGroupLoader.
Definition at line 68 of file TranslatablePageMessageGroupStore.php.
|
static |
Hook: TranslateInitGroupLoaders.
array | &$groupLoader | |
array | $deps | Dependencies |
Definition at line 118 of file TranslatablePageMessageGroupStore.php.
|
protected |
Definition at line 29 of file TranslatablePageMessageGroupStore.php.
|
protected |
Definition at line 27 of file TranslatablePageMessageGroupStore.php.
|
protected |
Definition at line 34 of file TranslatablePageMessageGroupStore.php.