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 27 of file MessageGroupOld.php.
|
staticprotected |
Definition at line 302 of file MessageGroupOld.php.
MessageGroupOld::exists | ( | ) |
Can be overwritten to return false if something is wrong.
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 263 of file MessageGroupOld.php.
MessageGroupOld::getDefinitions | ( | ) |
This function returns array of type key => definition of all messages this message group handles.
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentMessageGroup, SandboxMessageGroup, SubsetMessageGroup, WikiMessageGroup, WikiPageMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 141 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 90 of file MessageGroupOld.php.
MessageGroupOld::getIcon | ( | ) |
Returns an icon for this message group if any.
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 98 of file MessageGroupOld.php.
MessageGroupOld::getId | ( | ) |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 52 of file MessageGroupOld.php.
MessageGroupOld::getKeys | ( | ) |
@inheritDoc
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 161 of file MessageGroupOld.php.
MessageGroupOld::getLabel | ( | IContextSource | $context = null | ) |
IContextSource | null | $context |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, WikiPageMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 37 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 SubsetMessageGroup, and WikiMessageGroup.
Definition at line 173 of file MessageGroupOld.php.
MessageGroupOld::getMessageFile | ( | $code | ) |
Returns path to the file where translation of language code $code are.
string | $code |
Definition at line 207 of file MessageGroupOld.php.
MessageGroupOld::getMessageFileWithPath | ( | $code | ) |
MessageGroupOld::getMessageGroupStates | ( | ) |
Get the message group workflow state configuration.
Implements MessageGroup.
Definition at line 287 of file MessageGroupOld.php.
MessageGroupOld::getNamespace | ( | ) |
Get the namespace where all the messages of this group belong.
Implements MessageGroup.
Definition at line 72 of file MessageGroupOld.php.
MessageGroupOld::getPath | ( | ) |
Definition at line 211 of file MessageGroupOld.php.
MessageGroupOld::getSourceFilePath | ( | $code | ) |
Definition at line 230 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 112 of file MessageGroupOld.php.
MessageGroupOld::getSupportConfig | ( | ) |
Gets support URL defined for the group if any.
Implements MessageGroup.
Definition at line 322 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.
Reimplemented in SubsetMessageGroup.
Definition at line 271 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 318 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 156 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 267 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 242 of file MessageGroupOld.php.
MessageGroupOld::isMeta | ( | ) |
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 108 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 SubsetMessageGroup, and WikiPageMessageGroup.
Definition at line 131 of file MessageGroupOld.php.
|
static |
Definition at line 182 of file MessageGroupOld.php.
MessageGroupOld::setDescription | ( | $value | ) |
Definition at line 94 of file MessageGroupOld.php.
MessageGroupOld::setId | ( | $value | ) |
string | $value |
Definition at line 57 of file MessageGroupOld.php.
MessageGroupOld::setLabel | ( | $value | ) |
string | $value |
Definition at line 42 of file MessageGroupOld.php.
MessageGroupOld::setNamespace | ( | $ns | ) |
Set the namespace where all the messages of this group belong.
int | $ns |
Definition at line 80 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 88 of file MessageGroupOld.php.
|
protected |
Group-wide unique id of this group.
Used also for sorting.
Definition at line 49 of file MessageGroupOld.php.
|
protected |
Human-readable name of this group.
Definition at line 31 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 120 of file MessageGroupOld.php.
|
protected |
All the messages for this group, by language code.
Definition at line 199 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 106 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 66 of file MessageGroupOld.php.