WikiPageMessageGroup Class Reference
[Page TranslationMessage group]

Wraps the translatable page sections into a message group. More...

Inheritance diagram for WikiPageMessageGroup:
Inheritance graph
[legend]
Collaboration diagram for WikiPageMessageGroup:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 __construct ($id, $source)
 Constructor.
 getSourceLanguage ()
 Defaults to wiki content language.
 getTitle ()
 getDefinitions ()
 load ($code)
 Returns a list of messages in a given language code.
 getMessage ($key, $code)
 Returns of stored translation of message specified by the $key in language code $code.
 getChecker ()
 getDescription (IContextSource $context=null)
 Returns a longer description about the group.

Protected Attributes

 $title
 $definitions
 Only used for caching to avoid repeating database queries for example during message index rebuild.

Detailed Description

Wraps the translatable page sections into a message group.

Definition at line 15 of file WikiPageMessageGroup.php.


Constructor & Destructor Documentation

WikiPageMessageGroup::__construct ( id,
source 
)

Constructor.

Parameters:
string $id Unique id for this group.
string $source Mediawiki message that contains list of message keys.

Reimplemented from WikiMessageGroup.

Definition at line 19 of file WikiPageMessageGroup.php.


Member Function Documentation

WikiPageMessageGroup::getChecker (  ) 
Returns:
MediaWikiMessageChecker

Reimplemented from MessageGroupOld.

Definition at line 124 of file WikiPageMessageGroup.php.

WikiPageMessageGroup::getDefinitions (  ) 
Returns:
array

Todo:
: use getTextForTrans?

Reimplemented from WikiMessageGroup.

Definition at line 49 of file WikiPageMessageGroup.php.

Referenced by load().

Here is the call graph for this function:

WikiPageMessageGroup::getDescription ( IContextSource $  context = null  ) 

Returns a longer description about the group.

Description can use wikitext. Parameter $context was added in 2012-10-22.

Parameters:
IContextSource $context Context can be used by subclasses to provide translated descriptions, for example.
Returns:
string

Reimplemented from MessageGroupOld.

Definition at line 137 of file WikiPageMessageGroup.php.

Here is the call graph for this function:

WikiPageMessageGroup::getMessage ( key,
code 
)

Returns of stored translation of message specified by the $key in language code $code.

Parameters:
$key   String   Key of the message.
$code   String   Language code.
Returns:
  Mixed   Stored translation or null.

Reimplemented from WikiMessageGroup.

Definition at line 98 of file WikiPageMessageGroup.php.

Here is the call graph for this function:

WikiPageMessageGroup::getSourceLanguage (  ) 

Defaults to wiki content language.

Returns:
string Language code

Reimplemented from WikiMessageGroup.

Definition at line 25 of file WikiPageMessageGroup.php.

Here is the call graph for this function:

WikiPageMessageGroup::getTitle (  ) 
Returns:
Title

Definition at line 32 of file WikiPageMessageGroup.php.

Referenced by getDefinitions(), getDescription(), and getSourceLanguage().

WikiPageMessageGroup::load ( code  ) 

Returns a list of messages in a given language code.

For some groups that list may be identical with the translation in the wiki. For other groups the messages may be loaded from a file (and differ from the current translations or definitions).

Parameters:
$code 
Returns:
array

Reimplemented from MessageGroupOld.

Definition at line 82 of file WikiPageMessageGroup.php.

Referenced by getMessage().

Here is the call graph for this function:


Member Data Documentation

WikiPageMessageGroup::$definitions [protected]

Only used for caching to avoid repeating database queries for example during message index rebuild.

Definition at line 44 of file WikiPageMessageGroup.php.

WikiPageMessageGroup::$title [protected]

Definition at line 17 of file WikiPageMessageGroup.php.

Referenced by getDescription(), and getMessage().


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