MediaWiki master
|
This class generates message blobs for use by ResourceLoader. More...
Inherits LoggerAwareInterface.
Public Member Functions | |
__construct (ResourceLoader $rl, ?LoggerInterface $logger, ?WANObjectCache $wanObjectCache) | |
clear () | |
Invalidate cache keys for all known modules. | |
getBlob (Module $module, $lang) | |
Get the message blob for a module. | |
getBlobs (array $modules, $lang) | |
Get the message blobs for a set of modules. | |
setLogger (LoggerInterface $logger) | |
updateMessage ( $key) | |
Invalidate cache keys for modules using this message key. | |
Static Public Member Functions | |
static | clearGlobalCacheEntry (WANObjectCache $cache) |
Invalidate cache keys for all known modules. | |
Protected Member Functions | |
fetchMessage ( $key, $lang) | |
recacheMessageBlob ( $cacheKey, Module $module, $lang) | |
Protected Attributes | |
LoggerInterface | $logger |
WANObjectCache | $wanCache |
This class generates message blobs for use by ResourceLoader.
A message blob is a JSON object containing the interface messages for a certain module in a certain language.
Definition at line 42 of file MessageBlobStore.php.
MediaWiki\ResourceLoader\MessageBlobStore::__construct | ( | ResourceLoader | $rl, |
?LoggerInterface | $logger, | ||
?WANObjectCache | $wanObjectCache ) |
ResourceLoader | $rl | |
LoggerInterface | null | $logger | |
WANObjectCache | null | $wanObjectCache |
Definition at line 57 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\$logger, and MediaWiki\MediaWikiServices\getInstance().
MediaWiki\ResourceLoader\MessageBlobStore::clear | ( | ) |
Invalidate cache keys for all known modules.
Used by purgeMessageBlobStore.php
Definition at line 205 of file MessageBlobStore.php.
|
static |
Invalidate cache keys for all known modules.
Used by LocalisationCache and DatabaseUpdater after regenerating l10n cache.
WANObjectCache | $cache |
Definition at line 216 of file MessageBlobStore.php.
References WANObjectCache\touchCheckKey().
Referenced by MediaWiki\Installer\DatabaseUpdater\purgeCache().
|
protected |
string | $key | Message key |
string | $lang | Language code |
Definition at line 233 of file MessageBlobStore.php.
References wfMessage().
MediaWiki\ResourceLoader\MessageBlobStore::getBlob | ( | Module | $module, |
$lang ) |
Get the message blob for a module.
Module | $module | |
string | $lang | Language code |
Definition at line 88 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\getBlobs(), and MediaWiki\ResourceLoader\Module\getName().
MediaWiki\ResourceLoader\MessageBlobStore::getBlobs | ( | array | $modules, |
$lang ) |
Get the message blobs for a set of modules.
Module[] | $modules | Array of module objects keyed by name |
string | $lang | Language code |
Definition at line 101 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\recacheMessageBlob().
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlob().
|
protected |
string | $cacheKey | |
Module | $module | |
string | $lang |
Definition at line 173 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\$wanCache, Wikimedia\Rdbms\Database\getCacheSetOptions(), MediaWiki\MediaWikiServices\getInstance(), and WANObjectCache\set().
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlobs().
MediaWiki\ResourceLoader\MessageBlobStore::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 76 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\$logger.
MediaWiki\ResourceLoader\MessageBlobStore::updateMessage | ( | $key | ) |
Invalidate cache keys for modules using this message key.
Called by MessageCache when a message has changed.
string | $key | Message key |
Definition at line 191 of file MessageBlobStore.php.
|
protected |
Definition at line 47 of file MessageBlobStore.php.
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\__construct(), and MediaWiki\ResourceLoader\MessageBlobStore\setLogger().
|
protected |
Definition at line 50 of file MessageBlobStore.php.
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\recacheMessageBlob().