MediaWiki REL1_33
RawMessage.php
Go to the documentation of this file.
1<?php
34class RawMessage extends Message {
35
47 public function __construct( $text, $params = [] ) {
48 if ( !is_string( $text ) ) {
49 throw new InvalidArgumentException( '$text must be a string' );
50 }
51
52 parent::__construct( $text, $params );
53
54 // The key is the message.
55 $this->message = $text;
56 }
57
63 public function fetchMessage() {
64 // Just in case the message is unset somewhere.
65 if ( $this->message === null ) {
66 $this->message = $this->key;
67 }
68
69 return $this->message;
70 }
71
72}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
The Message class provides methods which fulfil two basic services:
Definition Message.php:160
string $key
The message key.
Definition Message.php:202
string $message
Definition Message.php:238
Variant of the Message class.
fetchMessage()
Fetch the message (in this case, the key).
__construct( $text, $params=[])
Call the parent constructor, then store the key as the message.
$params