Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
MediaWiki\Extension\Translate\MessageLoading\ThinMessage Class Reference

Message object which is based on database result row. More...

Inheritance diagram for MediaWiki\Extension\Translate\MessageLoading\ThinMessage:
MediaWiki\Extension\Translate\MessageLoading\Message

Public Member Functions

 setRow (stdClass $row)
 Set the database row this message is based on.
 
 setTranslation (string $text)
 Set the current translation of this message.
 
 translation ()
 @inheritDoc
 
 getProperty (string $key)
 
 getPropertyNames ()
 Get all the available property names.
 
- Public Member Functions inherited from MediaWiki\Extension\Translate\MessageLoading\Message
 __construct (string $key, ?string $definition)
 Creates new message object.
 
 key ()
 Get the message key.
 
 definition ()
 Get the message definition.
 
 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)
 

Protected Attributes

stdClass $row = null
 Database Result Row.
 
string $translation = null
 Stored translation.
 
- Protected Attributes inherited from MediaWiki\Extension\Translate\MessageLoading\Message
string $key
 Message display key.
 
string $definition
 Message definition.
 
string $infile = null
 Committed in-file translation.
 
array $tags = []
 
array $props = []
 Message properties.
 
array $reviewers = []
 

Static Protected Attributes

static array $propertyMap
 This maps properties to fields in the database result row.
 

Detailed Description

Message object which is based on database result row.

Hence the name thin. Needs fields rev_user_text and those that are needed for loading revision text.

Author
Niklas Laxström

Definition at line 17 of file ThinMessage.php.

Member Function Documentation

◆ getProperty()

MediaWiki\Extension\Translate\MessageLoading\ThinMessage::getProperty ( string $key)
Returns
mixed

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\Message.

Definition at line 50 of file ThinMessage.php.

◆ getPropertyNames()

MediaWiki\Extension\Translate\MessageLoading\ThinMessage::getPropertyNames ( )

Get all the available property names.

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\Message.

Definition at line 59 of file ThinMessage.php.

◆ setRow()

MediaWiki\Extension\Translate\MessageLoading\ThinMessage::setRow ( stdClass $row)

Set the database row this message is based on.

Parameters
stdClass$rowDatabase Result Row

Definition at line 32 of file ThinMessage.php.

◆ setTranslation()

MediaWiki\Extension\Translate\MessageLoading\ThinMessage::setTranslation ( string $text)

Set the current translation of this message.

Definition at line 37 of file ThinMessage.php.

◆ translation()

MediaWiki\Extension\Translate\MessageLoading\ThinMessage::translation ( )

@inheritDoc

Reimplemented from MediaWiki\Extension\Translate\MessageLoading\Message.

Definition at line 42 of file ThinMessage.php.

Member Data Documentation

◆ $propertyMap

array MediaWiki\Extension\Translate\MessageLoading\ThinMessage::$propertyMap
staticprotected
Initial value:
= [
'last-translator-text' => 'rev_user_text',
'last-translator-id' => 'rev_user',
]

This maps properties to fields in the database result row.

Definition at line 19 of file ThinMessage.php.

◆ $row

stdClass MediaWiki\Extension\Translate\MessageLoading\ThinMessage::$row = null
protected

Database Result Row.

Definition at line 24 of file ThinMessage.php.

◆ $translation

string MediaWiki\Extension\Translate\MessageLoading\ThinMessage::$translation = null
protected

Stored translation.

Definition at line 26 of file ThinMessage.php.


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