wiki.techinc.nl/includes/libs/Message/MessageParam.php
Tim Starling 09cd8eb080 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
2019-08-28 12:28:05 +10:00

36 lines
567 B
PHP

<?php
namespace Wikimedia\Message;
/**
* The base class for message parameters.
*/
abstract class MessageParam {
protected $type;
protected $value;
/**
* Get the type of the parameter.
*
* @return string One of the ParamType constants
*/
public function getType() {
return $this->type;
}
/**
* Get the input value of the parameter
*
* @return int|float|string|array
*/
public function getValue() {
return $this->value;
}
/**
* Dump the object for testing/debugging
*
* @return string
*/
abstract public function dump();
}