MediaWiki  master
ResponseException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Rest;
4 
18 
23  private $response;
24 
30  public function __construct( Response $response ) {
31  parent::__construct( 'Response', $response->getStatusCode() );
32  $this->response = $response;
33  }
34 
38  public function getResponse(): Response {
39  return $this->response;
40  }
41 }
MediaWiki\Rest\ResponseException\getResponse
getResponse()
Definition: ResponseException.php:38
MediaWiki\Rest\ResponseException\__construct
__construct(Response $response)
Definition: ResponseException.php:30
MediaWiki\Rest\Response\getStatusCode
getStatusCode()
Gets the response status code.
Definition: Response.php:36
MediaWiki\Rest\Response
Definition: Response.php:8
MediaWiki\Rest
MediaWiki\Rest\HttpException
This is the base exception class for non-fatal exceptions thrown from REST handlers.
Definition: HttpException.php:12
MediaWiki\Rest\ResponseException
This is an exception class that wraps a Response and extends HttpException.
Definition: ResponseException.php:17
MediaWiki\Rest\ResponseException\$response
Response $response
The wrapped Response.
Definition: ResponseException.php:23