Interface for message objects used by MessageCollection. More...
Public Member Functions | |
__construct (string $key, ?string $definition) | |
Creates new message object. | |
key () | |
Get the message key. | |
definition () | |
Get the message definition. | |
translation () | |
Get the message translation. | |
setInfile (string $text) | |
Set the committed translation. | |
infile () | |
Returns the committed translation. | |
addTag (string $tag) | |
Add a tag for this message. | |
hasTag (string $tag) | |
Check if this message has a given tag. | |
getTags () | |
Return all tags for this message. | |
setProperty (string $key, $value) | |
appendProperty (string $key, $value) | |
getProperty (string $key) | |
getPropertyNames () | |
Get all the available property names. | |
Protected Attributes | |
string | $key |
Message display key. | |
string | $definition |
Message definition. | |
string | $infile = null |
Committed in-file translation. | |
array | $tags = [] |
array | $props = [] |
Message properties. | |
array | $reviewers = [] |
Interface for message objects used by MessageCollection.
Definition at line 13 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::__construct | ( | string | $key, |
?string | $definition ) |
Creates new message object.
string | $key | Unique key identifying this message. |
string | null | $definition | The authoritave definition of this message. |
Definition at line 33 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::addTag | ( | string | $tag | ) |
Add a tag for this message.
Definition at line 66 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::appendProperty | ( | string | $key, |
$value ) |
string | $key | |
mixed | $value |
Definition at line 95 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::definition | ( | ) |
Get the message definition.
Message definition should not be empty, but sometimes is. See: https://phabricator.wikimedia.org/T285830
Definition at line 48 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::getProperty | ( | string | $key | ) |
Reimplemented in MediaWiki\Extension\Translate\MessageLoading\ThinMessage.
Definition at line 103 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::getPropertyNames | ( | ) |
Get all the available property names.
Reimplemented in MediaWiki\Extension\Translate\MessageLoading\ThinMessage.
Definition at line 108 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::getTags | ( | ) |
MediaWiki\Extension\Translate\MessageLoading\Message::hasTag | ( | string | $tag | ) |
Check if this message has a given tag.
Definition at line 71 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::infile | ( | ) |
Returns the committed translation.
Definition at line 61 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::key | ( | ) |
Get the message key.
Definition at line 39 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::setInfile | ( | string | $text | ) |
Set the committed translation.
Definition at line 56 of file Message.php.
MediaWiki\Extension\Translate\MessageLoading\Message::setProperty | ( | string | $key, |
$value ) |
string | $key | |
mixed | $value |
Definition at line 87 of file Message.php.
|
abstract |
Get the message translation.
Reimplemented in MediaWiki\Extension\Translate\MessageLoading\FatMessage, and MediaWiki\Extension\Translate\MessageLoading\ThinMessage.
|
protected |
Message definition.
Definition at line 17 of file Message.php.
|
protected |
Committed in-file translation.
Definition at line 19 of file Message.php.
|
protected |
Message display key.
Definition at line 15 of file Message.php.
|
protected |
Message properties.
Definition at line 23 of file Message.php.
|
protected |
Definition at line 25 of file Message.php.
|
protected |
Definition at line 21 of file Message.php.