An injectable service interface for message formatting, somewhat narrowed compared to Message. Only the text format is implemented in this framework so far, with getTextFormatter() returning a formatter that converts to the text format. Other formatters could be added to MessageFormatterFactory. Bug: T226598 Change-Id: Id053074c1dbcb692e8309fdca602f94a385bca0c
11 lines
284 B
PHP
11 lines
284 B
PHP
<?php
|
|
|
|
namespace MediaWiki\Rest;
|
|
|
|
use Wikimedia\Message\MessageValue;
|
|
|
|
class LocalizedHttpException extends HttpException {
|
|
public function __construct( MessageValue $message, $code = 500 ) {
|
|
parent::__construct( 'Localized exception with key ' . $message->getKey(), $code );
|
|
}
|
|
}
|