Class for pointing to messages, like Title class is for titles. More...
Public Member Functions | |
__construct (LinkTarget $title) | |
isMessageNamespace () | |
Check if this handle is in a message namespace. | |
figureMessage () | |
Recommended to use getCode and getKey instead. | |
getKey () | |
Returns the identified or guessed message key. | |
getCode () | |
Returns the language code. | |
getEffectiveLanguage () | |
Return the Language object for the assumed language of the content, which might be different from the subpage code (qqq, no subpage). | |
isDoc () | |
Determine whether the current handle is for message documentation. | |
isPageTranslation () | |
Determine whether the current handle is for page translation feature. | |
getGroupIds () | |
Returns all message group ids this message belongs to. | |
getGroup () | |
Get the primary MessageGroup this message belongs to. | |
isValid () | |
Checks if the handle corresponds to a known message. | |
getTitle () | |
Get the original title. | |
getTitleForLanguage ( $code) | |
Get the original title. | |
getTitleForBase () | |
Get the title for the page base. | |
isFuzzy () | |
Check if a title is marked as fuzzy. | |
getInternalKey () | |
This returns the key that can be used for showMessage parameter for Special:Translate for regular message groups. | |
Static Public Member Functions | |
static | hasFuzzyString ( $text) |
Check if a string contains the fuzzy string. | |
Protected Attributes | |
$title | |
$key | |
$code | |
$groupIds | |
Class for pointing to messages, like Title class is for titles.
Definition at line 19 of file MessageHandle.php.
MessageHandle::__construct | ( | LinkTarget | $title | ) |
Definition at line 29 of file MessageHandle.php.
MessageHandle::figureMessage | ( | ) |
Recommended to use getCode and getKey instead.
Definition at line 48 of file MessageHandle.php.
MessageHandle::getCode | ( | ) |
Returns the language code.
For language codeless source messages will return empty string.
Definition at line 82 of file MessageHandle.php.
MessageHandle::getEffectiveLanguage | ( | ) |
Return the Language object for the assumed language of the content, which might be different from the subpage code (qqq, no subpage).
Definition at line 94 of file MessageHandle.php.
MessageHandle::getGroup | ( | ) |
Get the primary MessageGroup this message belongs to.
You should check first that the handle is valid.
MWException |
Definition at line 143 of file MessageHandle.php.
MessageHandle::getGroupIds | ( | ) |
Returns all message group ids this message belongs to.
The primary message group id is always the first one. If the handle does not correspond to any message, the returned array is empty.
Definition at line 129 of file MessageHandle.php.
MessageHandle::getInternalKey | ( | ) |
This returns the key that can be used for showMessage parameter for Special:Translate for regular message groups.
It is not possible to automatically determine this key from the title alone.
Definition at line 262 of file MessageHandle.php.
MessageHandle::getKey | ( | ) |
Returns the identified or guessed message key.
Definition at line 71 of file MessageHandle.php.
MessageHandle::getTitle | ( | ) |
MessageHandle::getTitleForBase | ( | ) |
Get the title for the page base.
Definition at line 216 of file MessageHandle.php.
MessageHandle::getTitleForLanguage | ( | $code | ) |
Get the original title.
string | $code | Language code. |
Definition at line 204 of file MessageHandle.php.
|
static |
Check if a string contains the fuzzy string.
string | $text | Arbitrary text |
Definition at line 229 of file MessageHandle.php.
MessageHandle::isDoc | ( | ) |
Determine whether the current handle is for message documentation.
Definition at line 107 of file MessageHandle.php.
MessageHandle::isFuzzy | ( | ) |
Check if a title is marked as fuzzy.
Definition at line 237 of file MessageHandle.php.
MessageHandle::isMessageNamespace | ( | ) |
Check if this handle is in a message namespace.
Definition at line 37 of file MessageHandle.php.
MessageHandle::isPageTranslation | ( | ) |
Determine whether the current handle is for page translation feature.
This does not consider whether the handle corresponds to any message.
Definition at line 118 of file MessageHandle.php.
MessageHandle::isValid | ( | ) |
Checks if the handle corresponds to a known message.
Definition at line 157 of file MessageHandle.php.
|
protected |
Definition at line 25 of file MessageHandle.php.
|
protected |
Definition at line 27 of file MessageHandle.php.
|
protected |
Definition at line 23 of file MessageHandle.php.
|
protected |
Definition at line 21 of file MessageHandle.php.