Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
TMessage Class Reference

Interface for message objects used by MessageCollection. More...

Inheritance diagram for TMessage:
FatMessage ThinMessage

Public Member Functions

 __construct ( $key, $definition)
 Creates new message object.
 
 key ()
 Get the message key.
 
 definition ()
 Get the message definition.
 
 translation ()
 Get the message translation.
 
 setInfile ( $text)
 Set the committed translation.
 
 infile ()
 Returns the committed translation.
 
 addTag ( $tag)
 Add a tag for this message.
 
 hasTag ( $tag)
 Check if this message has a given tag.
 
 getTags ()
 Return all tags for this message;.
 
 setProperty ( $key, $value)
 
 appendProperty ( $key, $value)
 
 getProperty ( $key)
 
 getPropertyNames ()
 Get all the available property names.
 

Protected Attributes

 $key
 
 $definition
 
 $infile
 
 $tags = []
 
 $props = []
 
 $reviewers = []
 

Detailed Description

Interface for message objects used by MessageCollection.

Definition at line 14 of file Message.php.

Constructor & Destructor Documentation

◆ __construct()

TMessage::__construct ( $key,
$definition )

Creates new message object.

Parameters
string$keyUnique key identifying this message.
string$definitionThe authoritave definition of this message.

Definition at line 34 of file Message.php.

Member Function Documentation

◆ addTag()

TMessage::addTag ( $tag)

Add a tag for this message.

Parameters
string$tag

Definition at line 81 of file Message.php.

◆ appendProperty()

TMessage::appendProperty ( $key,
$value )

Definition at line 106 of file Message.php.

◆ definition()

string Message TMessage::definition ( )

Get the message definition.

Returns
string

Definition at line 51 of file Message.php.

◆ getProperty()

TMessage::getProperty ( $key)

Definition at line 113 of file Message.php.

◆ getPropertyNames()

TMessage::getPropertyNames ( )

Get all the available property names.

Returns
array
Since
2013-01-17

Reimplemented in ThinMessage.

Definition at line 122 of file Message.php.

◆ getTags()

TMessage::getTags ( )

Return all tags for this message;.

Returns
string[]

Definition at line 98 of file Message.php.

◆ hasTag()

TMessage::hasTag ( $tag)

Check if this message has a given tag.

Parameters
string$tag
Returns
bool

Definition at line 90 of file Message.php.

◆ infile()

TMessage::infile ( )

Returns the committed translation.

Returns
?string

Definition at line 73 of file Message.php.

◆ key()

string Message display TMessage::key ( )

Get the message key.

Returns
string

Definition at line 43 of file Message.php.

◆ setInfile()

TMessage::setInfile ( $text)

Set the committed translation.

Parameters
string$text

Definition at line 65 of file Message.php.

◆ setProperty()

TMessage::setProperty ( $key,
$value )

Definition at line 102 of file Message.php.

◆ translation()

string Committed in file TMessage::translation ( )
abstract

Get the message translation.

Returns
?string

Reimplemented in ThinMessage, and FatMessage.

Member Data Documentation

◆ $definition

TMessage::$definition
protected

Definition at line 18 of file Message.php.

◆ $infile

TMessage::$infile
protected

Definition at line 20 of file Message.php.

◆ $key

TMessage::$key
protected

Definition at line 16 of file Message.php.

◆ $props

TMessage::$props = []
protected

Definition at line 24 of file Message.php.

◆ $reviewers

TMessage::$reviewers = []
protected

Definition at line 26 of file Message.php.

◆ $tags

TMessage::$tags = []
protected

Definition at line 22 of file Message.php.


The documentation for this class was generated from the following file: