X-Git-Url: https://scripts.mit.edu/gitweb/autoinstallsdev/mediawiki.git/blobdiff_plain/19e297c21b10b1b8a3acad5e73fc71dcb35db44a..6932310fd58ebef145fa01eb76edf7150284d8ea:/includes/api/ApiHelpParamValueMessage.php
diff --git a/includes/api/ApiHelpParamValueMessage.php b/includes/api/ApiHelpParamValueMessage.php
new file mode 100644
index 00000000..162b7cd6
--- /dev/null
+++ b/includes/api/ApiHelpParamValueMessage.php
@@ -0,0 +1,95 @@
+paramValue = $paramValue;
+ $this->deprecated = (bool)$deprecated;
+ }
+
+ /**
+ * 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 message.
+ * @return string
+ */
+ public function fetchMessage() {
+ if ( $this->message === null ) {
+ $dep = '';
+ if ( $this->isDeprecated() ) {
+ $msg = new Message( 'api-help-param-deprecated' );
+ $msg->interface = $this->interface;
+ $msg->language = $this->language;
+ $msg->useDatabase = $this->useDatabase;
+ $msg->title = $this->title;
+ $dep = '' . $msg->fetchMessage() . ' ';
+ }
+ $this->message = ";{$this->paramValue}:"
+ . $dep . parent::fetchMessage();
+ }
+ return $this->message;
+ }
+
+}