MediaWiki  1.34.0
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 ) {
11  parent::__construct( 'Localized exception with key ' . $messageValue->getKey(), $code );
12  $this->messageValue = $messageValue;
13  }
14 
15  public function getMessageValue() {
16  return $this->messageValue;
17  }
18 }
Wikimedia\Message\MessageValue
Value object representing a message for i18n.
Definition: MessageValue.php:14
MediaWiki\Rest\LocalizedHttpException\getMessageValue
getMessageValue()
Definition: LocalizedHttpException.php:15
MediaWiki\Rest
MediaWiki\Rest\LocalizedHttpException\__construct
__construct(MessageValue $messageValue, $code=500)
Definition: LocalizedHttpException.php:10
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