MediaWiki 1.39.10
|
This class generates message blobs for use by ResourceLoader. More...
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 51 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 66 of file MessageBlobStore.php.
References MediaWiki\ResourceLoader\MessageBlobStore\$logger, and MediaWiki\MediaWikiServices\getInstance().
MediaWiki\ResourceLoader\MessageBlobStore::clear | ( | ) |
Invalidate cache keys for all known modules.
Definition at line 191 of file MessageBlobStore.php.
|
static |
Invalidate cache keys for all known modules.
Called by LocalisationCache after cache is regenerated.
WANObjectCache | $cache |
Definition at line 202 of file MessageBlobStore.php.
References $cache.
|
protected |
Definition at line 219 of file MessageBlobStore.php.
References $lang, and wfMessage().
MediaWiki\ResourceLoader\MessageBlobStore::getBlob | ( | Module | $module, |
$lang ) |
Get the message blob for a module.
Module | $module | |
string | $lang | Language code |
Definition at line 97 of file MessageBlobStore.php.
References $lang, 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 110 of file MessageBlobStore.php.
References $cache, $lang, $modules, MediaWiki\ResourceLoader\MessageBlobStore\$wanCache, and MediaWiki\ResourceLoader\MessageBlobStore\recacheMessageBlob().
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlob().
|
protected |
string | $cacheKey | |
Module | $module | |
string | $lang |
Definition at line 163 of file MessageBlobStore.php.
References $blob, $cache, $lang, MediaWiki\ResourceLoader\MessageBlobStore\$wanCache, DB_REPLICA, Wikimedia\Rdbms\Database\getCacheSetOptions(), WANObjectCache\set(), and wfGetDB().
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlobs().
MediaWiki\ResourceLoader\MessageBlobStore::setLogger | ( | LoggerInterface | $logger | ) |
LoggerInterface | $logger |
Definition at line 85 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 180 of file MessageBlobStore.php.
|
protected |
Definition at line 56 of file MessageBlobStore.php.
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\__construct(), and MediaWiki\ResourceLoader\MessageBlobStore\setLogger().
|
protected |
Definition at line 59 of file MessageBlobStore.php.
Referenced by MediaWiki\ResourceLoader\MessageBlobStore\getBlobs(), and MediaWiki\ResourceLoader\MessageBlobStore\recacheMessageBlob().