paramValue = $paramValue; $this->deprecated = (bool)$deprecated; $this->internal = (bool)$internal; } /** * Fetch the parameter value * @return string */ public function getParamValue() { return $this->paramValue; } /** * Fetch the 'deprecated' flag * @since 1.30 * @return bool */ public function isDeprecated() { return $this->deprecated; } /** * Fetch the 'internal' flag * @since 1.35 * @return bool */ public function isInternal() { return $this->internal; } /** * @return string */ public function fetchMessage() { if ( $this->message === null ) { $prefix = ";{$this->paramValue}:"; if ( $this->isDeprecated() ) { $prefix .= '' . $this->subMessage( 'api-help-param-deprecated' ) . '' . $this->subMessage( 'word-separator' ); } if ( $this->isInternal() ) { $prefix .= '' . $this->subMessage( 'api-help-param-internal' ) . '' . $this->subMessage( 'word-separator' ); } if ( $this->getLanguage()->getCode() === 'qqx' ) { # Insert a list of alternative message keys for &uselang=qqx. $keylist = implode( ' / ', $this->keysToTry ); if ( $this->overriddenKey !== null ) { $keylist .= ' = ' . $this->overriddenKey; } $this->message = $prefix . "($keylist$*)"; } else { $this->message = $prefix . parent::fetchMessage(); } } return $this->message; } private function subMessage( $key ) { $msg = new Message( $key ); $msg->isInterface = $this->isInterface; $msg->language = $this->language; $msg->useDatabase = $this->useDatabase; $msg->contextPage = $this->contextPage; return $msg->plain(); } } /** @deprecated class alias since 1.43 */ class_alias( ApiHelpParamValueMessage::class, 'ApiHelpParamValueMessage' );