MediaWiki master
|
The constants used to specify parameter types. More...
Static Public Member Functions | |
static | cases () |
Public Attributes | |
const | BITRATE = 'bitrate' |
A number of bits per second. | |
const | DATE = 'date' |
A date in one of the formats accepted by the Wikimedia\Timestamp library. | |
const | DATETIME = 'datetime' |
A date time in one of the formats accepted by the Wikimedia\Timestamp library. | |
const | DURATION_LONG = 'duration' |
A number of seconds, to be formatted as natural language text. | |
const | DURATION_SHORT = 'period' |
A number of seconds, to be formatted as natural language text in an abbreviated way. | |
const | EXPIRY = 'expiry' |
An expiry time. | |
const | GROUP = 'group' |
User Group. | |
const | LIST = 'list' |
A list of values. | |
const | NUM = 'num' |
A number, to be formatted using local digits and separators. | |
const | OBJECT = 'object' |
For arbitrary stringable objects. | |
const | PLAINTEXT = 'plaintext' |
A text parameter which is substituted after formatter processing. | |
const | RAW = 'raw' |
A text parameter which is substituted after formatter processing. | |
const | SIZE = 'size' |
A number of bytes. | |
const | TEXT = 'text' |
A simple text string or another MessageValue, not otherwise formatted. | |
const | TIME = 'time' |
A time in one of the formats accepted by the Wikimedia\Timestamp library. | |
The constants used to specify parameter types.
The values of the constants are an unstable implementation detail.
Unless otherwise noted, these should be used with an instance of ScalarParam.
Definition at line 11 of file ParamType.php.
|
static |
Definition at line 100 of file ParamType.php.
Referenced by Wikimedia\Message\ScalarParam\__construct().
const Wikimedia\Message\ParamType::BITRATE = 'bitrate' |
A number of bits per second.
The output will be rounded to an appropriate magnitude.
Definition at line 79 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\bitrateParams().
const Wikimedia\Message\ParamType::DATE = 'date' |
A date in one of the formats accepted by the Wikimedia\Timestamp library.
The output is a date in local format.
Definition at line 53 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\dateParams().
const Wikimedia\Message\ParamType::DATETIME = 'datetime' |
A date time in one of the formats accepted by the Wikimedia\Timestamp library.
The output is a date and time in local format.
Definition at line 46 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\dateTimeParams().
const Wikimedia\Message\ParamType::DURATION_LONG = 'duration' |
A number of seconds, to be formatted as natural language text.
The value will be output exactly.
Definition at line 22 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\longDurationParams().
const Wikimedia\Message\ParamType::DURATION_SHORT = 'period' |
A number of seconds, to be formatted as natural language text in an abbreviated way.
The output will be rounded to an appropriate magnitude.
Definition at line 28 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\shortDurationParams().
const Wikimedia\Message\ParamType::EXPIRY = 'expiry' |
An expiry time.
The input is either a timestamp in one of the formats accepted by the Wikimedia\Timestamp library, or "infinity" if the thing doesn't expire.
The output is a date and time in local format, or a string representing an "infinite" expiry.
Definition at line 39 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\expiryParams().
const Wikimedia\Message\ParamType::GROUP = 'group' |
User Group.
Definition at line 66 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\userGroupParams().
const Wikimedia\Message\ParamType::LIST = 'list' |
A list of values.
Must be used with ListParam.
Definition at line 82 of file ParamType.php.
Referenced by Wikimedia\Message\ListParam\__construct(), Wikimedia\Message\ScalarParam\__construct(), and Wikimedia\Message\ListParam\newFromJsonArray().
const Wikimedia\Message\ParamType::NUM = 'num' |
A number, to be formatted using local digits and separators.
Definition at line 16 of file ParamType.php.
Referenced by Wikimedia\ParamValidator\TypeDef\NumericDef\getHelpInfo(), and Wikimedia\Message\MessageValue\numParams().
const Wikimedia\Message\ParamType::OBJECT = 'object' |
For arbitrary stringable objects.
Definition at line 73 of file ParamType.php.
Referenced by Wikimedia\Message\ScalarParam\__construct(), and Wikimedia\Message\MessageValue\objectParams().
const Wikimedia\Message\ParamType::PLAINTEXT = 'plaintext' |
A text parameter which is substituted after formatter processing.
The output will be escaped as appropriate for the output format so as to represent plain text rather than any sort of markup.
Definition at line 98 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\plaintextParams(), Wikimedia\ParamValidator\TypeDef\EnumDef\validate(), and Wikimedia\ParamValidator\ParamValidator\validateValue().
const Wikimedia\Message\ParamType::RAW = 'raw' |
A text parameter which is substituted after formatter processing.
The creator of the parameter and message is responsible for ensuring that the value will be safe for the intended output format, and documenting what that intended output format is.
Definition at line 91 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\rawParams().
const Wikimedia\Message\ParamType::SIZE = 'size' |
A number of bytes.
The output will be rounded to an appropriate magnitude.
Definition at line 76 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\sizeParams().
const Wikimedia\Message\ParamType::TEXT = 'text' |
A simple text string or another MessageValue, not otherwise formatted.
Definition at line 13 of file ParamType.php.
Referenced by Wikimedia\Message\ListParam\__construct(), Wikimedia\Message\MessageValue\params(), and Wikimedia\Message\MessageValue\textParams().
const Wikimedia\Message\ParamType::TIME = 'time' |
A time in one of the formats accepted by the Wikimedia\Timestamp library.
The output is a time in local format.
Definition at line 60 of file ParamType.php.
Referenced by Wikimedia\Message\MessageValue\timeParams().