Update git submodules
[mediawiki.git] / includes / libs / Message / ITextFormatter.php
blob79ee097cf6e925ab67399ee76acbc9027015a357
1 <?php
3 namespace Wikimedia\Message;
5 /**
6 * Converts MessageValue message specifiers to localized plain text in a certain language.
8 * The caller cannot modify the details of message translation, such as which
9 * of multiple sources the message is taken from. Any such flags may be injected
10 * into the factory constructor.
12 * Implementations of TextFormatter are not required to perfectly format
13 * any message in any language. Implementations should make a best effort to
14 * produce human-readable text.
16 * @package MediaWiki\MessageFormatter
18 interface ITextFormatter {
19 /**
20 * Get the internal language code in which format() is
21 * @return string
23 public function getLangCode();
25 /**
26 * Convert a MessageValue to text.
28 * The result is not safe for use as raw HTML.
30 * @param MessageValue $message
31 * @return string
32 * @return-taint tainted
34 public function format( MessageValue $message );