MessageFormatterFactory
authorTim Starling <tstarling@wikimedia.org>
Mon, 15 Jul 2019 10:24:38 +0000 (20:24 +1000)
committerTim Starling <tstarling@wikimedia.org>
Wed, 28 Aug 2019 02:28:05 +0000 (12:28 +1000)
commit09cd8eb0807ee7b0a94c674766e2ea201e5d071b
tree50cefe6e78377459c32e1fadbc6b56fc1fed0800
parent3bb3c8b0ae092b2e667f6f33abfc98f9c205d53c
MessageFormatterFactory

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
16 files changed:
includes/AutoLoader.php
includes/MediaWikiServices.php
includes/Message/MessageFormatterFactory.php [new file with mode: 0644]
includes/Message/TextFormatter.php [new file with mode: 0644]
includes/Rest/LocalizedHttpException.php [new file with mode: 0644]
includes/ServiceWiring.php
includes/libs/Message/IMessageFormatterFactory.php [new file with mode: 0644]
includes/libs/Message/ITextFormatter.php [new file with mode: 0644]
includes/libs/Message/ListParam.php [new file with mode: 0644]
includes/libs/Message/ListType.php [new file with mode: 0644]
includes/libs/Message/MessageParam.php [new file with mode: 0644]
includes/libs/Message/MessageValue.php [new file with mode: 0644]
includes/libs/Message/ParamType.php [new file with mode: 0644]
includes/libs/Message/TextParam.php [new file with mode: 0644]
tests/phpunit/includes/Message/TextFormatterTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/Message/MessageValueTest.php [new file with mode: 0644]