Page MenuHomeWickedGov Phorge

RedirectException.php
No OneTemporary

Size
889 B
Referenced Files
None
Subscribers
None

RedirectException.php

<?php
namespace MediaWiki\Rest;
/**
* This is an exception class that extends HttpException and will
* generate a redirect when handled. It is used when a redirect is
* treated as an exception output in your API, and you want to be able
* to throw it from wherever you are and immediately halt request
* processing.
*
* @newable
* @since 1.36
*/
class RedirectException extends HttpException {
/**
* The redirect target (an absolute URL)
* @var string
*/
private $target;
/**
* @stable to call
*
* @param int $code The HTTP status code (3xx) for this redirect
* @param string $target The redirect target (an absolute URL)
*/
public function __construct( int $code, string $target ) {
parent::__construct( 'Redirect', $code );
$this->target = $target;
}
/**
* @return string
*/
public function getTarget(): string {
return $this->target;
}
}

File Metadata

Mime Type
text/x-php
Expires
Fri, Dec 19, 03:29 (1 d, 8 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1f/0c/a4041179257f339996454c3e266e
Default Alt Text
RedirectException.php (889 B)

Event Timeline