MediaWiki
REL1_34
RawMessage.php
Go to the documentation of this file.
1
<?php
34
class
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
}
Message
The Message class provides methods which fulfil two basic services:
Definition
Message.php:162
Message\$key
string $key
The message key.
Definition
Message.php:204
Message\$message
string $message
Definition
Message.php:240
RawMessage
Variant of the Message class.
Definition
RawMessage.php:34
RawMessage\fetchMessage
fetchMessage()
Fetch the message (in this case, the key).
Definition
RawMessage.php:63
RawMessage\__construct
__construct( $text, $params=[])
Call the parent constructor, then store the key as the message.
Definition
RawMessage.php:47
includes
RawMessage.php
Generated on Fri Apr 5 2024 23:10:22 for MediaWiki by
1.9.8