|
MediaWiki master
|
Message subclass that prepends wikitext for API help. More...
Inherits MediaWiki\Message\Message.

Public Member Functions | |
| __construct ( $paramValue, $text, $params=[], $deprecated=false, $internal=false) | |
| fetchMessage () | |
| getParamValue () | |
| Fetch the parameter value. | |
| isDeprecated () | |
| Fetch the 'deprecated' flag. | |
| isInternal () | |
| Fetch the 'internal' flag. | |
Public Member Functions inherited from MediaWiki\Message\Message | |
| __construct ( $key, $params=[], ?Language $language=null) | |
| __serialize () | |
| __toString () | |
| Magic method implementation of the above, so we can do, eg: $foo = new Message( $key ); $string = "<abbr>$foo</abbr>";. | |
| __unserialize ( $data) | |
| bitrateParams (... $params) | |
| Add parameters that are bitrates and will be passed through Language::formatBitrate before substitution. | |
| dateParams (... $params) | |
| Add parameters that are dates and will be passed through Language::date before substitution. | |
| dateTimeParams (... $params) | |
| Add parameters that are date-times and will be passed through Language::timeanddate before substitution. | |
| durationParams (... $params) | |
| Add parameters that are durations of time and will be passed through Language::formatDuration before substitution. | |
| escaped () | |
| Returns the message text. | |
| exists () | |
| Check whether a message key has been defined currently. | |
| expiryParams (... $params) | |
| Add parameters that are expiration times and will be passed through Language::formatExpiry before substitution. | |
| getKey () | |
| Returns the message key. | |
| getKeysToTry () | |
| getLanguage () | |
| Returns the Language of the Message. | |
| getLanguageCode () | |
| Get the language code of the Message. | |
| getParams () | |
| Returns the message parameters. | |
| getTitle () | |
| Get a title object for a mediawiki message, where it can be found in the mediawiki namespace. | |
| inContentLanguage () | |
| Request the message in the wiki's content language, unless it is disabled for this message. | |
| inLanguage ( $lang) | |
| Request the message in any language that is supported. | |
| inUserLanguage () | |
| Request the message in the user's current language, overriding any explicit language that was previously set. | |
| isBlank () | |
| Check whether a message does not exist, or is an empty string. | |
| isDisabled () | |
| Check whether a message does not exist, is an empty string, or is "-". | |
| isMultiKey () | |
| numParams (... $params) | |
| Add parameters that are numeric and will be passed through Language::formatNum before substitution. | |
| page (?PageReference $page) | |
| Set the page object to use as context when transforming the message. | |
| params (... $params) | |
| Adds parameters to the parameter list of this message. | |
| parse () | |
| Fully parse the text from wikitext to HTML. | |
| parseAsBlock () | |
| Returns the parsed message text which is always surrounded by a block element. | |
| plain () | |
| Returns the message text as-is, only parameters are substituted. | |
| plaintextParams (... $params) | |
| Add parameters that are plaintext and will be passed through without the content being evaluated. | |
| rawParams (... $params) | |
| Add parameters that are substituted after parsing or escaping. | |
| serialize () | |
| setContext (IContextSource $context) | |
| Set the language and the title from a context object. | |
| setInterfaceMessageFlag ( $interface) | |
| Allows manipulating the interface message flag directly. | |
| sizeParams (... $params) | |
| Add parameters that are file sizes and will be passed through Language::formatSize before substitution. | |
| text () | |
| Returns the message text. | |
| timeParams (... $params) | |
| Add parameters that are times and will be passed through Language::time before substitution. | |
| timeperiodParams (... $params) | |
| Add parameters that are time periods and will be passed through Language::formatTimePeriod before substitution. | |
| title ( $title) | |
| Set the Title object to use as context when transforming the message. | |
| toString (string $format) | |
| Returns the message formatted a certain way. | |
| unserialize ( $serialized) | |
| useDatabase ( $useDatabase) | |
| userGroupParams (... $params) | |
| Add parameters that represent user groups. | |
Protected Attributes | |
| bool | $deprecated |
| bool | $internal |
| string | $paramValue |
Protected Attributes inherited from MediaWiki\Message\Message | |
| Content null | $content = null |
| Content object representing the message. | |
| PageReference | $contextPage = null |
| page object to use as context. | |
| string null | $fetchedLangCode |
| If the message was fetched via a fallback sequence from a language other than the requested one, this will be the final language code. | |
| bool | $isInterface = true |
| In which language to get this message. | |
| string | $key |
| The message key. | |
| string[] | $keysToTry |
| List of keys to try when fetching the message. | |
| Language string null | $language = null |
| In which language to get this message. | |
| string null false | $message |
| string | $overriddenKey = null |
| The message key that the message was fetched from, if different from all of the requested $keysToTry (the requested key may be overridden by hooks). | |
| MessageParam Message string int float[] | $parameters = [] |
| List of parameters which will be substituted into the message. | |
| bool | $useDatabase = true |
| If messages in the local MediaWiki namespace should be loaded; false to use only the compiled LocalisationCache. | |
| callable null | $userLangCallback |
| A callable which returns the current user language, or null to get it from global state. | |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\Message\Message | |
| static | bitrateParam ( $bitrate) |
| static | dateParam (string $date) |
| static | dateTimeParam (string $dateTime) |
| static | durationParam ( $duration) |
| static | expiryParam ( $expiry) |
| static | listParam (array $list, $type=ListType::AND) |
| static | newFallbackSequence (... $keys) |
| Factory function accepting multiple message keys and returning a message instance for the first message which is non-empty. | |
| static | newFromKey ( $key,... $params) |
| Factory function that is just wrapper for the real constructor. | |
| static | newFromSpecifier ( $value) |
| Transform a MessageSpecifier or a primitive value used interchangeably with specifiers (a message key string, or a key + params array) into a proper Message. | |
| static | numParam ( $num) |
| static | plaintextParam ( $plaintext) |
| static | rawParam ( $raw) |
| static | sizeParam ( $size) |
| static | timeParam (string $time) |
| static | timeperiodParam ( $period) |
| static | userGroupParam (string $userGroup) |
Public Attributes inherited from MediaWiki\Message\Message | |
| const | FORMAT_BLOCK_PARSE = 'block-parse' |
| Use normal wikitext -> HTML parsing (the result will be wrapped in a block-level HTML tag) | |
| const | FORMAT_ESCAPED = 'escaped' |
| Transform {{..}} constructs, HTML-escape the result. | |
| const | FORMAT_PARSE = 'parse' |
| Use normal wikitext -> HTML parsing but strip the block-level wrapper. | |
| const | FORMAT_PLAIN = 'plain' |
| Use message text as-is. | |
| const | FORMAT_TEXT = 'text' |
| Transform {{..}} constructs but don't transform to HTML. | |
Protected Member Functions inherited from MediaWiki\Message\Message | |
| extractParam ( $param, $format) | |
| Extracts the parameter type and preprocessed the value if needed. | |
| formatListParam (array $params, $listType, $format) | |
| Formats a list of parameters as a concatenated string. | |
| formatPlaintext ( $plaintext, $format) | |
| Formats a message parameter wrapped with 'plaintext'. | |
| getFetchedLanguage () | |
| Get the language in which the message was fetched, or the requested language if it is not available. | |
| parseText (string $string) | |
| Wrapper for what ever method we use to parse wikitext. | |
| replaceParameters ( $message, $type, $format) | |
| Substitutes any parameters into the message text. | |
| transformText ( $string) | |
| Wrapper for what ever method we use to {{-transform wikitext (substituting the template with its parsed result). | |
Static Protected Member Functions inherited from MediaWiki\Message\Message | |
| static | listTypeMap (Language $lang, ListType $listType) |
| Mapping from Message::listParam() types to Language methods. | |
Message subclass that prepends wikitext for API help.
This exists so the apihelp-*-paramvalue-*-* messages don't all have to include markup wikitext while still keeping the 'APIGetParamDescriptionMessages' hook simple.
Definition at line 24 of file ApiHelpParamValueMessage.php.
| MediaWiki\Api\ApiHelpParamValueMessage::__construct | ( | $paramValue, | |
| $text, | |||
| $params = [], | |||
| $deprecated = false, | |||
| $internal = false ) |
| string | $paramValue | Parameter value being documented |
| string | $text | Message to use. |
| array | $params | Parameters for the message. |
| bool | $deprecated | Whether the value is deprecated |
| bool | $internal | Whether the value is internal |
$deprecated parameter $internal parameter Definition at line 45 of file ApiHelpParamValueMessage.php.
References MediaWiki\Api\ApiHelpParamValueMessage\$deprecated, MediaWiki\Api\ApiHelpParamValueMessage\$internal, and MediaWiki\Api\ApiHelpParamValueMessage\$paramValue.
| MediaWiki\Api\ApiHelpParamValueMessage::fetchMessage | ( | ) |
Reimplemented from MediaWiki\Message\Message.
Definition at line 87 of file ApiHelpParamValueMessage.php.
References MediaWiki\Message\Message\$message, MediaWiki\Message\Message\$overriddenKey, MediaWiki\Message\Message\getLanguage(), MediaWiki\Api\ApiHelpParamValueMessage\isDeprecated(), and MediaWiki\Api\ApiHelpParamValueMessage\isInternal().
| MediaWiki\Api\ApiHelpParamValueMessage::getParamValue | ( | ) |
Fetch the parameter value.
Definition at line 62 of file ApiHelpParamValueMessage.php.
References MediaWiki\Api\ApiHelpParamValueMessage\$paramValue.
| MediaWiki\Api\ApiHelpParamValueMessage::isDeprecated | ( | ) |
Fetch the 'deprecated' flag.
Definition at line 71 of file ApiHelpParamValueMessage.php.
References MediaWiki\Api\ApiHelpParamValueMessage\$deprecated.
Referenced by MediaWiki\Api\ApiHelpParamValueMessage\fetchMessage().
| MediaWiki\Api\ApiHelpParamValueMessage::isInternal | ( | ) |
Fetch the 'internal' flag.
Definition at line 80 of file ApiHelpParamValueMessage.php.
References MediaWiki\Api\ApiHelpParamValueMessage\$internal.
Referenced by MediaWiki\Api\ApiHelpParamValueMessage\fetchMessage().
|
protected |
Definition at line 29 of file ApiHelpParamValueMessage.php.
Referenced by MediaWiki\Api\ApiHelpParamValueMessage\__construct(), and MediaWiki\Api\ApiHelpParamValueMessage\isDeprecated().
|
protected |
Definition at line 31 of file ApiHelpParamValueMessage.php.
Referenced by MediaWiki\Api\ApiHelpParamValueMessage\__construct(), and MediaWiki\Api\ApiHelpParamValueMessage\isInternal().
|
protected |
Definition at line 27 of file ApiHelpParamValueMessage.php.
Referenced by MediaWiki\Api\ApiHelpParamValueMessage\__construct(), and MediaWiki\Api\ApiHelpParamValueMessage\getParamValue().