TranslationStashStorage Class Reference

Storage class for stashed translations. More...

List of all members.

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

Detailed Description

Storage class for stashed translations.

This one uses sql tables as storage.

Since:
2013.06

Definition at line 14 of file TranslationStashStorage.php.


Constructor & Destructor Documentation

TranslationStashStorage::__construct ( DatabaseBase $  db,
table = 'translate_stash' 
)

Definition at line 18 of file TranslationStashStorage.php.


Member Function Documentation

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.

Here is the call graph for this function:

TranslationStashStorage::deleteTranslations ( User $  user  ) 

Delete all stashed translations for the given user.

Parameters:
User $user
Since:
2013.10

Definition at line 73 of file TranslationStashStorage.php.

TranslationStashStorage::getTranslations ( User $  user  ) 

Gets all stashed translations for the given user.

Parameters:
User $user
Returns:
StashedTranslation[]

Definition at line 49 of file TranslationStashStorage.php.


Member Data Documentation

TranslationStashStorage::$db [protected]

Definition at line 15 of file TranslationStashStorage.php.

TranslationStashStorage::$dbTable [protected]

Definition at line 16 of file TranslationStashStorage.php.


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:56 2013 for MediaWiki Translate Extension by  doxygen 1.6.3