MediaWiki  master
RedirectException.php
Go to the documentation of this file.
1 <?php
2 
3 namespace MediaWiki\Rest;
4 
16 
21  private $target;
22 
29  public function __construct( int $code, string $target ) {
30  parent::__construct( 'Redirect', $code );
31  $this->target = $target;
32  }
33 
37  public function getTarget(): string {
38  return $this->target;
39  }
40 }
MediaWiki\Rest\RedirectException\__construct
__construct(int $code, string $target)
Definition: RedirectException.php:29
MediaWiki\Rest\RedirectException
This is an exception class that extends HttpException and will generate a redirect when handled.
Definition: RedirectException.php:15
MediaWiki\Rest\RedirectException\getTarget
getTarget()
Definition: RedirectException.php:37
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\RedirectException\$target
string $target
The redirect target (an absolute URL)
Definition: RedirectException.php:21