MediaWiki  master
LocalizedHttpException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Rest;
4 
6 
8  private $messageValue;
9 
10  public function __construct( MessageValue $messageValue, $code = 500, $errorData = null ) {
11  parent::__construct(
12  'Localized exception with key ' . $messageValue->getKey(), $code, $errorData
13  );
14  $this->messageValue = $messageValue;
15  }
16 
17  public function getMessageValue() {
18  return $this->messageValue;
19  }
20 }
MediaWiki\Rest\LocalizedHttpException\__construct
__construct(MessageValue $messageValue, $code=500, $errorData=null)
Definition: LocalizedHttpException.php:10
Wikimedia\Message\MessageValue
Value object representing a message for i18n.
Definition: MessageValue.php:14
MediaWiki\Rest\HttpException\$errorData
array null $errorData
Definition: HttpException.php:13
MediaWiki\Rest\LocalizedHttpException\getMessageValue
getMessageValue()
Definition: LocalizedHttpException.php:17
MediaWiki\Rest
MediaWiki\Rest\HttpException
This is the base exception class for non-fatal exceptions thrown from REST handlers.
Definition: HttpException.php:10
MediaWiki\Rest\LocalizedHttpException\$messageValue
$messageValue
Definition: LocalizedHttpException.php:8
MediaWiki\Rest\LocalizedHttpException
Definition: LocalizedHttpException.php:7