Storage class for stashed translations. More...
Public Member Functions | |
__construct (DatabaseBase $db, $table= 'translate_stash') | |
addTranslation (StashedTranslation $item) | |
Adds a new translation to the stash. | |
getTranslations (User $user) | |
Gets all stashed translations for the given user. | |
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 14 of file TranslationStashStorage.php.
TranslationStashStorage::__construct | ( | DatabaseBase $ | db, | |
$ | table = 'translate_stash' | |||
) |
Definition at line 18 of file TranslationStashStorage.php.
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.
Definition at line 27 of file TranslationStashStorage.php.
TranslationStashStorage::deleteTranslations | ( | User $ | user | ) |
Delete all stashed translations for the given user.
User | $user |
Definition at line 73 of file TranslationStashStorage.php.
TranslationStashStorage::getTranslations | ( | User $ | user | ) |
Gets all stashed translations for the given user.
User | $user |
Definition at line 49 of file TranslationStashStorage.php.
TranslationStashStorage::$db [protected] |
Definition at line 15 of file TranslationStashStorage.php.
TranslationStashStorage::$dbTable [protected] |
Definition at line 16 of file TranslationStashStorage.php.