/**
* In which language to get this message. True, which is the default,
* means the current interface language, false content language.
/**
* In which language to get this message. True, which is the default,
* means the current interface language, false content language.
- * @param $key: message key, or array of message keys to try and use the first non-empty message for
- * @param array $params message parameters
- * @return Message: $this
+ *
+ * @param string|string[] $key Message key or array of message keys to try and use the first
+ * non-empty message for.
+ * @param array $params Message parameters.
* Factory function that is just wrapper for the real constructor. It is
* intended to be used instead of the real constructor, because it allows
* chaining method calls, while new objects don't.
* Factory function that is just wrapper for the real constructor. It is
* intended to be used instead of the real constructor, because it allows
* chaining method calls, while new objects don't.
- * @param string $key message key
- * @param Varargs: parameters as Strings
- * @return Message: $this
+ *
+ * @param string|string[] $key Message key or array of keys.
+ * @param mixed [$param,...] Parameters as strings.
+ *
+ * @return Message
* Factory function accepting multiple message keys and returning a message instance
* for the first message which is non-empty. If all messages are empty then an
* instance of the first message key is returned.
* Factory function accepting multiple message keys and returning a message instance
* for the first message which is non-empty. If all messages are empty then an
* instance of the first message key is returned.
- * @param Varargs: message keys (or first arg as an array of all the message keys)
- * @return Message: $this
+ *
+ * @param string|string[] [$keys,...] Message keys, or first argument as an array of all the
+ * message keys.
+ *
+ * @return Message
- * @param Varargs: parameters as Strings, or a single argument that is an array of Strings
- * @return Message: $this
+ *
+ * @param mixed [$params,...] Parameters as strings, or a single argument that is
+ * an array of strings.
+ *
+ * @return Message $this
* In other words the parsing process cannot access the contents
* of this type of parameter, and you need to make sure it is
* sanitized beforehand. The parser will see "$n", instead.
* In other words the parsing process cannot access the contents
* of this type of parameter, and you need to make sure it is
* sanitized beforehand. The parser will see "$n", instead.
- * @param Varargs: raw parameters as Strings (or single argument that is an array of raw parameters)
- * @return Message: $this
+ *
+ * @param mixed [$params,...] Raw parameters as strings, or a single argument that is
+ * an array of raw parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are numeric and will be passed through
* Language::formatNum before substitution
/**
* Add parameters that are numeric and will be passed through
* Language::formatNum before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param mixed [$param,...] Numeric parameters, or a single argument that is
+ * an array of numeric parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are durations of time and will be passed through
* Language::formatDuration before substitution
/**
* Add parameters that are durations of time and will be passed through
* Language::formatDuration before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param int|int[] [$param,...] Duration parameters, or a single argument that is
+ * an array of duration parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are expiration times and will be passed through
* Language::formatExpiry before substitution
/**
* Add parameters that are expiration times and will be passed through
* Language::formatExpiry before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param string|string[] [$param,...] Expiry parameters, or a single argument that is
+ * an array of expiry parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are time periods and will be passed through
* Language::formatTimePeriod before substitution
/**
* Add parameters that are time periods and will be passed through
* Language::formatTimePeriod before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param number|number[] [$param,...] Time period parameters, or a single argument that is
+ * an array of time period parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are file sizes and will be passed through
* Language::formatSize before substitution
/**
* Add parameters that are file sizes and will be passed through
* Language::formatSize before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param int|int[] [$param,...] Size parameters, or a single argument that is
+ * an array of size parameters.
+ *
+ * @return Message $this
/**
* Add parameters that are bitrates and will be passed through
* Language::formatBitrate before substitution
/**
* Add parameters that are bitrates and will be passed through
* Language::formatBitrate before substitution
- * @param Varargs: numeric parameters (or single argument that is array of numeric parameters)
- * @return Message: $this
+ *
+ * @param int|int[] [$param,...] Bit rate parameters, or a single argument that is
+ * an array of bit rate parameters.
+ *
+ * @return Message $this
*/
public function setContext( IContextSource $context ) {
$this->inLanguage( $context->getLanguage() );
*/
public function setContext( IContextSource $context ) {
$this->inLanguage( $context->getLanguage() );
* Request the message in any language that is supported.
* As a side effect interface message status is unconditionally
* turned off.
* Request the message in any language that is supported.
* As a side effect interface message status is unconditionally
* turned off.
*/
public function inLanguage( $lang ) {
if ( $lang instanceof Language || $lang instanceof StubUserLang ) {
*/
public function inLanguage( $lang ) {
if ( $lang instanceof Language || $lang instanceof StubUserLang ) {
/**
* Request the message in the wiki's content language,
* unless it is disabled for this message.
/**
* Request the message in the wiki's content language,
* unless it is disabled for this message.
/**
* Allows manipulating the interface message flag directly.
* Can be used to restore the flag after setting a language.
/**
* Allows manipulating the interface message flag directly.
* Can be used to restore the flag after setting a language.
* Magic method implementation of the above (for PHP >= 5.2.0), so we can do, eg:
* $foo = Message::get( $key );
* $string = "<abbr>$foo</abbr>";
* Magic method implementation of the above (for PHP >= 5.2.0), so we can do, eg:
* $foo = Message::get( $key );
* $string = "<abbr>$foo</abbr>";
/**
* Returns the message text. {{-transformation is done and the result
* is escaped excluding any raw parameters.
/**
* Returns the message text. {{-transformation is done and the result
* is escaped excluding any raw parameters.
- * @param string|array $param Parameter as defined in this class.
- * @return Tuple(type, value)
+ *
+ * @param mixed $param Parameter as defined in this class.
+ *
+ * @return array Array with the parameter type (either "before" or "after") and the value.
*/
protected function parseText( $string ) {
$out = MessageCache::singleton()->parse( $string, $this->title, /*linestart*/true, $this->interface, $this->language );
*/
protected function parseText( $string ) {
$out = MessageCache::singleton()->parse( $string, $this->title, /*linestart*/true, $this->interface, $this->language );
* @return string Wikitext with {{-constructs replaced with their values.
*/
protected function transformText( $string ) {
* @return string Wikitext with {{-constructs replaced with their values.
*/
protected function transformText( $string ) {
*/
public function __construct( $key, $params = array() ) {
parent::__construct( $key, $params );
*/
public function __construct( $key, $params = array() ) {
parent::__construct( $key, $params );