Storage class for stashed translations. More...
Public Member Functions | |
__construct (IDatabase $db, string $table='translate_stash') | |
getTranslations (User $user) | |
Gets all stashed translations for the given user. | |
addTranslation (StashedTranslation $item) | |
Adds a new translation to the stash. | |
deleteTranslations (User $user) | |
Delete all stashed translations for the given user. | |
Protected Attributes | |
$db | |
$dbTable | |
Storage class for stashed translations.
This one uses sql tables as storage.
Definition at line 17 of file TranslationStashStorage.php.
MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashStorage::__construct | ( | IDatabase | $db, |
string | $table = 'translate_stash' ) |
Definition at line 23 of file TranslationStashStorage.php.
MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashStorage::addTranslation | ( | StashedTranslation | $item | ) |
Adds a new translation to the stash.
If the same key already exists, the previous translation and metadata will be replaced with the new one.
Implements MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashWriter.
Definition at line 49 of file TranslationStashStorage.php.
MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashStorage::deleteTranslations | ( | User | $user | ) |
Delete all stashed translations for the given user.
Implements MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashWriter.
Definition at line 66 of file TranslationStashStorage.php.
MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashStorage::getTranslations | ( | User | $user | ) |
Gets all stashed translations for the given user.
Implements MediaWiki\Extension\Translate\TranslatorSandbox\TranslationStashReader.
Definition at line 28 of file TranslationStashStorage.php.
|
protected |
Definition at line 19 of file TranslationStashStorage.php.
|
protected |
Definition at line 21 of file TranslationStashStorage.php.