MediaWiki
REL1_39
LocalizedHttpException.php
Go to the documentation of this file.
1
<?php
2
3
namespace
MediaWiki\Rest
;
4
5
use
Wikimedia\Message\MessageValue
;
6
10
class
LocalizedHttpException
extends
HttpException
{
11
private
$messageValue;
12
20
public
function
__construct
(
MessageValue
$messageValue, $code = 500, $errorData =
null
) {
21
parent::__construct(
22
'Localized exception with key '
. $messageValue->
getKey
(), $code, $errorData
23
);
24
$this->messageValue = $messageValue;
25
}
26
27
public
function
getMessageValue
() {
28
return
$this->messageValue;
29
}
30
}
MediaWiki\Rest\HttpException
This is the base exception class for non-fatal exceptions thrown from REST handlers.
Definition
HttpException.php:12
MediaWiki\Rest\LocalizedHttpException
Definition
LocalizedHttpException.php:10
MediaWiki\Rest\LocalizedHttpException\getMessageValue
getMessageValue()
Definition
LocalizedHttpException.php:27
MediaWiki\Rest\LocalizedHttpException\__construct
__construct(MessageValue $messageValue, $code=500, $errorData=null)
Definition
LocalizedHttpException.php:20
Wikimedia\Message\MessageValue
Value object representing a message for i18n.
Definition
MessageValue.php:18
Wikimedia\Message\MessageValue\getKey
getKey()
Get the message key.
Definition
MessageValue.php:53
MediaWiki\Rest
includes
Rest
LocalizedHttpException.php
Generated on Sat Dec 14 2024 03:23:46 for MediaWiki by
1.10.0