WikiMessageGroup Class Reference
[Message group]

Group for messages that can be controlled via a page in MediaWiki namespace. More...

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

List of all members.

Public Member Functions

 __construct ($id, $source)
 Constructor.
 getSourceLanguage ()
 Defaults to wiki content language.
 getDefinitions ()
 Fetch definitions from database.
 getMessage ($key, $code)
 Returns of stored translation of message specified by the $key in language code $code.

Protected Attributes

 $source = null

Detailed Description

Group for messages that can be controlled via a page in MediaWiki namespace.

In the page comments start with # and continue till the end of the line. The page should contain list of page names in MediaWiki namespace, without the namespace prefix. Use underscores for spaces in page names, since whitespace separates the page names from each other.

Definition at line 21 of file WikiMessageGroup.php.


Constructor & Destructor Documentation

WikiMessageGroup::__construct ( id,
source 
)

Constructor.

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

Reimplemented in WikiPageMessageGroup.

Definition at line 30 of file WikiMessageGroup.php.

Here is the call graph for this function:


Member Function Documentation

WikiMessageGroup::getDefinitions (  ) 

Fetch definitions from database.

Returns:
array Array of messages keys with definitions.

Reimplemented from MessageGroupOld.

Reimplemented in RecentMessageGroup, SandboxMessageGroup, WikiPageMessageGroup, and MockWikiMessageGroup.

Definition at line 50 of file WikiMessageGroup.php.

WikiMessageGroup::getMessage ( key,
code 
)

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

Parameters:
string $key Key of the message.
string $code Language code.
Returns:
string|null The translation or null if it doesn't exists.

Reimplemented from MessageGroupOld.

Reimplemented in WikiPageMessageGroup.

Definition at line 82 of file WikiMessageGroup.php.

Here is the call graph for this function:

WikiMessageGroup::getSourceLanguage (  ) 

Defaults to wiki content language.

Returns:
string Language code

Reimplemented from MessageGroupOld.

Reimplemented in WikiPageMessageGroup.

Definition at line 40 of file WikiMessageGroup.php.

Referenced by getMessage().


Member Data Documentation

WikiMessageGroup::$source = null [protected]

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