|
MediaWiki master
|
LocalisationCache optimised for loading many languages at once. More...
Inherits MediaWiki\Language\LocalisationCache.

Public Member Functions | |
| getItem ( $code, $key) | |
| getSubitem ( $code, $key, $subkey) | |
| recache ( $code) | |
| unload ( $code) | |
Public Member Functions inherited from MediaWiki\Language\LocalisationCache | |
| __construct (ServiceOptions $options, LCStore $store, LoggerInterface $logger, array $clearStoreCallbacks, LanguageNameUtils $langNameUtils, HookContainer $hookContainer) | |
| For constructor parameters, \MediaWiki\MainConfigSchema::LocalisationCacheConf. | |
| disableBackend () | |
| Disable the storage backend. | |
| getMessagesDirs () | |
| Gets the combined list of messages dirs from core and extensions. | |
| getSubitemList ( $code, $key) | |
| Get the list of subitem keys for a given item. | |
| getSubitemWithSource ( $code, $key, $subkey) | |
| Get a subitem with its source language. | |
| isExpired ( $code) | |
| Returns true if the cache identified by $code is missing or expired. | |
| unloadAll () | |
| Unload all data. | |
Protected Member Functions | |
| readPHPFile ( $fileName, $fileType) | |
| trimCache () | |
| Unload cached languages until there are less than $this->maxLoadedLangs. | |
Protected Member Functions inherited from MediaWiki\Language\LocalisationCache | |
| getFallbackCodes (string $code) | |
| Get the set of language codes, including the current language code and any fallbacks to read from in order. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Language\LocalisationCache | |
| static | getStoreFromConf (array $conf, $fallbackCacheDir) |
| Return a suitable LCStore as specified by the given configuration. | |
Public Attributes inherited from MediaWiki\Language\LocalisationCache | |
| const | ALL_ALIAS_KEYS = [ 'specialPageAliases' ] |
| Keys for items which can be localized. | |
| const | ALL_KEYS |
| All item keys. | |
| const | CONSTRUCTOR_OPTIONS |
| const | VERSION = 5 |
Protected Attributes inherited from MediaWiki\Language\LocalisationCache | |
| array< string, array > | $data = [] |
| The cache data. | |
| array< string, array< string, array< string, string > > > | $sourceLanguage = [] |
| The source language of cached data items. | |
LocalisationCache optimised for loading many languages at once.
Used by maintenance/rebuildLocalisationCache.php.
Definition at line 16 of file LocalisationCacheBulkLoad.php.
| MediaWiki\Language\LocalisationCacheBulkLoad::getItem | ( | $code, | |
| $key ) |
| string | $code | |
| string | $key |
Reimplemented from MediaWiki\Language\LocalisationCache.
Definition at line 70 of file LocalisationCacheBulkLoad.php.
| MediaWiki\Language\LocalisationCacheBulkLoad::getSubitem | ( | $code, | |
| $key, | |||
| $subkey ) |
| string | $code | |
| string | $key | |
| string | $subkey |
Reimplemented from MediaWiki\Language\LocalisationCache.
Definition at line 83 of file LocalisationCacheBulkLoad.php.
|
protected |
| string | $fileName | |
| string | $fileType |
Reimplemented from MediaWiki\Language\LocalisationCache.
Definition at line 44 of file LocalisationCacheBulkLoad.php.
References MediaWiki\Language\LocalisationCache\$data.
| MediaWiki\Language\LocalisationCacheBulkLoad::recache | ( | $code | ) |
| string | $code |
Reimplemented from MediaWiki\Language\LocalisationCache.
Definition at line 93 of file LocalisationCacheBulkLoad.php.
References MediaWiki\Language\LocalisationCacheBulkLoad\trimCache().
|
protected |
Unload cached languages until there are less than $this->maxLoadedLangs.
Definition at line 111 of file LocalisationCacheBulkLoad.php.
References MediaWiki\Language\LocalisationCacheBulkLoad\unload(), and wfDebug().
Referenced by MediaWiki\Language\LocalisationCacheBulkLoad\recache().
| MediaWiki\Language\LocalisationCacheBulkLoad::unload | ( | $code | ) |
| string | $code |
Reimplemented from MediaWiki\Language\LocalisationCache.
Definition at line 103 of file LocalisationCacheBulkLoad.php.
Referenced by MediaWiki\Language\LocalisationCacheBulkLoad\trimCache().