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. | |
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 | |
getSupportConfig () | |
Gets support URL defined for the group if any. | |
getRelatedPage () | |
@inheritDoc | |
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' | |
$id = 'none' | |
$namespace = NS_MEDIAWIKI | |
$description = null | |
$meta = false | |
$mangler = null | |
$messages = [] | |
This is the interface and base implementation of unmanaged message groups.
Definition at line 29 of file MessageGroupOld.php.
|
staticprotected |
Definition at line 278 of file MessageGroupOld.php.
MessageGroupOld::exists | ( | ) |
Can be overwritten to return false if something is wrong.
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 239 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 149 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 96 of file MessageGroupOld.php.
MessageGroupOld::getIcon | ( | ) |
Returns an icon for this message group if any.
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 104 of file MessageGroupOld.php.
MessageGroupOld::getId | ( | ) |
Implements MessageGroup.
Reimplemented in MessagePrefixMessageGroup, RecentAdditionsMessageGroup, RecentMessageGroup, SandboxMessageGroup, and WorkflowStatesMessageGroup.
Definition at line 56 of file MessageGroupOld.php.
MessageGroupOld::getKeys | ( | ) |
@inheritDoc
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 169 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 40 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 181 of file MessageGroupOld.php.
MessageGroupOld::getMessageGroupStates | ( | ) |
Get the message group workflow state configuration.
Implements MessageGroup.
Definition at line 263 of file MessageGroupOld.php.
MessageGroupOld::getNamespace | ( | ) |
Get the namespace where all the messages of this group belong.
Implements MessageGroup.
Definition at line 77 of file MessageGroupOld.php.
MessageGroupOld::getRelatedPage | ( | ) |
@inheritDoc
Implements MessageGroup.
Reimplemented in WikiPageMessageGroup.
Definition at line 293 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 119 of file MessageGroupOld.php.
MessageGroupOld::getSupportConfig | ( | ) |
Gets support URL defined for the group if any.
Implements MessageGroup.
Definition at line 288 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 247 of file MessageGroupOld.php.
MessageGroupOld::getTranslatableLanguages | ( | ) |
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 164 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 243 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 218 of file MessageGroupOld.php.
MessageGroupOld::isMeta | ( | ) |
Implements MessageGroup.
Reimplemented in SubsetMessageGroup.
Definition at line 115 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 139 of file MessageGroupOld.php.
|
static |
Definition at line 190 of file MessageGroupOld.php.
MessageGroupOld::setDescription | ( | $value | ) |
Definition at line 100 of file MessageGroupOld.php.
MessageGroupOld::setId | ( | $value | ) |
string | $value |
Definition at line 61 of file MessageGroupOld.php.
MessageGroupOld::setLabel | ( | $value | ) |
string | $value |
Definition at line 45 of file MessageGroupOld.php.
MessageGroupOld::setNamespace | ( | $ns | ) |
Set the namespace where all the messages of this group belong.
int | $ns |
Definition at line 85 of file MessageGroupOld.php.
|
protected |
Definition at line 94 of file MessageGroupOld.php.
|
protected |
Definition at line 53 of file MessageGroupOld.php.
|
protected |
Definition at line 34 of file MessageGroupOld.php.
|
protected |
Definition at line 128 of file MessageGroupOld.php.
|
protected |
Definition at line 208 of file MessageGroupOld.php.
|
protected |
Definition at line 113 of file MessageGroupOld.php.
|
protected |
Definition at line 71 of file MessageGroupOld.php.