MediaWiki REL1_34
ScalarParam.php
Go to the documentation of this file.
1<?php
2
3namespace Wikimedia\Message;
4
17 public function __construct( $type, $value ) {
18 $this->type = $type;
19 $this->value = $value;
20 }
21
22 public function dump() {
23 if ( $this->value instanceof MessageValue ) {
24 $contents = $this->value->dump();
25 } else {
26 $contents = htmlspecialchars( $this->value );
27 }
28 return "<{$this->type}>" . $contents . "</{$this->type}>";
29 }
30}
Value object representing a message parameter that consists of a list of values.
Value object representing a message for i18n.
Value object representing a message parameter holding a single value.
__construct( $type, $value)
Construct a text parameter.
dump()
Dump the object for testing/debugging.