MediaWiki  1.34.0
ApiHelpParamValueMessage.php
Go to the documentation of this file.
1 <?php
34 
35  protected $paramValue;
36  protected $deprecated;
37 
48  public function __construct( $paramValue, $text, $params = [], $deprecated = false ) {
49  parent::__construct( $text, $params );
50  $this->paramValue = $paramValue;
51  $this->deprecated = (bool)$deprecated;
52  }
53 
58  public function getParamValue() {
59  return $this->paramValue;
60  }
61 
67  public function isDeprecated() {
68  return $this->deprecated;
69  }
70 
75  public function fetchMessage() {
76  if ( $this->message === null ) {
77  $dep = '';
78  if ( $this->isDeprecated() ) {
79  $msg = new Message( 'api-help-param-deprecated' );
80  $msg->interface = $this->interface;
81  $msg->language = $this->language;
82  $msg->useDatabase = $this->useDatabase;
83  $msg->title = $this->title;
84  $dep = '<span class="apihelp-deprecated">' . $msg->fetchMessage() . '</span> ';
85  }
86  $this->message = ";<span dir=\"ltr\" lang=\"en\">{$this->paramValue}</span>:"
87  . $dep . parent::fetchMessage();
88  }
89  return $this->message;
90  }
91 
92 }
ApiHelpParamValueMessage\getParamValue
getParamValue()
Fetch the parameter value.
Definition: ApiHelpParamValueMessage.php:58
Message
ApiHelpParamValueMessage\fetchMessage
fetchMessage()
Fetch the message.
Definition: ApiHelpParamValueMessage.php:75
ApiHelpParamValueMessage\__construct
__construct( $paramValue, $text, $params=[], $deprecated=false)
Definition: ApiHelpParamValueMessage.php:48
$title
$title
Definition: testCompression.php:34
ApiHelpParamValueMessage\$paramValue
$paramValue
Definition: ApiHelpParamValueMessage.php:35
ApiHelpParamValueMessage\isDeprecated
isDeprecated()
Fetch the 'deprecated' flag.
Definition: ApiHelpParamValueMessage.php:67
ApiHelpParamValueMessage\$deprecated
$deprecated
Definition: ApiHelpParamValueMessage.php:36
ApiHelpParamValueMessage
Message subclass that prepends wikitext for API help.
Definition: ApiHelpParamValueMessage.php:33