This is the interface and base implementation of unmanaged message groups. More...
Public Member Functions | |
getLabel (IContextSource $context=null) | |
setLabel ( $value) | |
getId () | |
setId ( $value) | |
getNamespace () | |
Get the namespace where all the messages of this group belong. | |
setNamespace ( $ns) | |
Set the namespace where all the messages of this group belong. | |
getDescription (IContextSource $context=null) | |
Returns a longer description about the group. | |
setDescription ( $value) | |
getIcon () | |
Returns an icon for this message group if any. | |
isMeta () | |
getSourceLanguage () | |
Returns language code depicting the language of source text. | |
getMangler () | |
load ( $code) | |
Returns a list of messages in a given language code. | |
getDefinitions () | |
This function returns array of type key => definition of all messages this message group handles. | |
getUniqueDefinitions () | |
This function can be used for meta message groups to list their "own" messages. | |
getKeys () | |
@inheritDoc | |
getMessage ( $key, $code) | |
Returns of stored translation of message specified by the $key in language code $code. | |
getMessageFile ( $code) | |
Returns path to the file where translation of language code $code are. | |
getPath () | |
getMessageFileWithPath ( $code) | |
getSourceFilePath ( $code) | |
initCollection ( $code, $unique=false) | |
Creates a new MessageCollection for this group. | |
exists () | |
Can be overwritten to return false if something is wrong. | |
getValidator () | |
Returns a message validator object or null. | |
getTags ( $type=null) | |
Returns message tags. | |
getMessageGroupStates () | |
Get the message group workflow state configuration. | |
getTranslatableLanguages () | |
@inheritDoc | |
getTranslationAids () | |
List of available message types mapped to the classes implementing them. | |
getSupportConfig () | |
Gets support URL defined for the group if any. | |
Public Member Functions inherited from MessageGroup | |
initCollection ( $code) | |
Initialises a message collection with the given language code, message definitions and message tags. | |
Static Public Member Functions | |
static | normaliseKeys ( $array) |
Protected Member Functions | |
isSourceLanguage ( $code) | |
Static Protected Member Functions | |
static | addContext (Message $message, IContextSource $context=null) |
Protected Attributes | |
$label = 'none' | |
Human-readable name of this group. | |
$id = 'none' | |
Group-wide unique id of this group. | |
$namespace = NS_MEDIAWIKI | |
The namespace where all the messages of this group belong. | |
$description = null | |
Holds description of this group. | |
$meta = false | |
Meta groups consist of multiple groups or parts of other groups. | |
$mangler = null | |
To avoid key conflicts between groups or separated changed messages between branches one can set a message key mangler. | |
$messages = [] | |
All the messages for this group, by language code. | |
This is the interface and base implementation of unmanaged message groups.
Definition at line 25 of file MessageGroupOld.php.
|
staticprotected |
Definition at line 300 of file MessageGroupOld.php.
MessageGroupOld::exists | ( | ) |
Can be overwritten to return false if something is wrong.
Implements MessageGroup.
Definition at line 262 of file MessageGroupOld.php.
MessageGroupOld::getDefinitions | ( | ) |
This function returns array of type key => definition of all messages this message group handles.
MWException |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentMessageGroup, SandboxMessageGroup, WikiMessageGroup, WikiPageMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 140 of file MessageGroupOld.php.
MessageGroupOld::getDescription | ( | IContextSource | $context = null | ) |
Returns a longer description about the group.
Description can use wikitext. Parameter $context was added in 2012-10-22.
IContextSource | null | $context | Context can be used by subclasses to provide translated descriptions, for example. |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, WikiPageMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 88 of file MessageGroupOld.php.
MessageGroupOld::getIcon | ( | ) |
Returns an icon for this message group if any.
Implements MessageGroup.
Definition at line 96 of file MessageGroupOld.php.
MessageGroupOld::getId | ( | ) |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 50 of file MessageGroupOld.php.
MessageGroupOld::getKeys | ( | ) |
MessageGroupOld::getLabel | ( | IContextSource | $context = null | ) |
IContextSource | null | $context |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, WikiPageMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 35 of file MessageGroupOld.php.
MessageGroupOld::getMangler | ( | ) |
MessageGroupOld::getMessage | ( | $key, | |
$code ) |
Returns of stored translation of message specified by the $key in language code $code.
string | $key | Message key |
string | $code | Language code |
Implements MessageGroup.
Reimplemented in WikiMessageGroup.
Definition at line 172 of file MessageGroupOld.php.
MessageGroupOld::getMessageFile | ( | $code | ) |
Returns path to the file where translation of language code $code are.
string | $code |
Definition at line 206 of file MessageGroupOld.php.
MessageGroupOld::getMessageFileWithPath | ( | $code | ) |
MessageGroupOld::getMessageGroupStates | ( | ) |
Get the message group workflow state configuration.
Implements MessageGroup.
Definition at line 286 of file MessageGroupOld.php.
MessageGroupOld::getNamespace | ( | ) |
Get the namespace where all the messages of this group belong.
Implements MessageGroup.
Definition at line 70 of file MessageGroupOld.php.
MessageGroupOld::getPath | ( | ) |
Definition at line 210 of file MessageGroupOld.php.
MessageGroupOld::getSourceFilePath | ( | $code | ) |
Definition at line 229 of file MessageGroupOld.php.
MessageGroupOld::getSourceLanguage | ( | ) |
Returns language code depicting the language of source text.
Implements MessageGroup.
Reimplemented in WikiMessageGroup, and WikiPageMessageGroup.
Definition at line 110 of file MessageGroupOld.php.
MessageGroupOld::getSupportConfig | ( | ) |
Gets support URL defined for the group if any.
Implements MessageGroup.
Definition at line 320 of file MessageGroupOld.php.
MessageGroupOld::getTags | ( | $type = null | ) |
Returns message tags.
If type is given, only message keys with that tag are returned. Otherwise an array[tag => keys] is returned.
string | null | $type |
Implements MessageGroup.
Definition at line 270 of file MessageGroupOld.php.
MessageGroupOld::getTranslatableLanguages | ( | ) |
MessageGroupOld::getTranslationAids | ( | ) |
List of available message types mapped to the classes implementing them.
Default implementation (all).
Definition at line 316 of file MessageGroupOld.php.
MessageGroupOld::getUniqueDefinitions | ( | ) |
This function can be used for meta message groups to list their "own" messages.
For example branched message groups can exclude the messages they share with each other.
Definition at line 155 of file MessageGroupOld.php.
MessageGroupOld::getValidator | ( | ) |
Returns a message validator object or null.
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentMessageGroup, SandboxMessageGroup, and WikiPageMessageGroup.
Definition at line 266 of file MessageGroupOld.php.
MessageGroupOld::initCollection | ( | $code, | |
$unique = false ) |
Creates a new MessageCollection for this group.
string | $code | Language code for this collection. |
bool | $unique | Whether to build collection for messages unique to this group only. |
Definition at line 241 of file MessageGroupOld.php.
MessageGroupOld::isMeta | ( | ) |
Implements MessageGroup.
Definition at line 106 of file MessageGroupOld.php.
|
protected |
MessageGroupOld::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).
string | $code |
Implements MessageGroup.
Reimplemented in WikiPageMessageGroup.
Definition at line 129 of file MessageGroupOld.php.
|
static |
Definition at line 181 of file MessageGroupOld.php.
MessageGroupOld::setDescription | ( | $value | ) |
Definition at line 92 of file MessageGroupOld.php.
MessageGroupOld::setId | ( | $value | ) |
string | $value |
Definition at line 55 of file MessageGroupOld.php.
MessageGroupOld::setLabel | ( | $value | ) |
string | $value |
Definition at line 40 of file MessageGroupOld.php.
MessageGroupOld::setNamespace | ( | $ns | ) |
Set the namespace where all the messages of this group belong.
int | $ns |
Definition at line 78 of file MessageGroupOld.php.
|
protected |
Holds description of this group.
Description is a wiki text snippet that gives information about this group to translators.
Definition at line 86 of file MessageGroupOld.php.
|
protected |
Group-wide unique id of this group.
Used also for sorting.
Definition at line 47 of file MessageGroupOld.php.
|
protected |
Human-readable name of this group.
Definition at line 29 of file MessageGroupOld.php.
|
protected |
To avoid key conflicts between groups or separated changed messages between branches one can set a message key mangler.
Definition at line 118 of file MessageGroupOld.php.
|
protected |
All the messages for this group, by language code.
Definition at line 198 of file MessageGroupOld.php.
|
protected |
Meta groups consist of multiple groups or parts of other groups.
This info is used on many places, like when creating message index.
Definition at line 104 of file MessageGroupOld.php.
|
protected |
The namespace where all the messages of this group belong.
If the group has messages from multiple namespaces, set this to false and look how RecentMessageGroup implements the definitions.
Definition at line 64 of file MessageGroupOld.php.