MediaWiki
master
ThrottledError.php
Go to the documentation of this file.
1
<?php
21
namespace
MediaWiki\Exception
;
22
30
class
ThrottledError
extends
ErrorPageError
{
31
35
public
function
__construct
() {
36
parent::__construct(
37
'actionthrottled'
,
38
'actionthrottledtext'
39
);
40
}
41
43
public
function
report
( $action =
ErrorPageError::SEND_OUTPUT
) {
44
global
$wgOut
;
45
$wgOut
->setStatusCode( 429 );
46
parent::report( $action );
47
}
48
}
49
51
class_alias( ThrottledError::class,
'ThrottledError'
);
$wgOut
if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition
Setup.php:559
MediaWiki\Exception\ErrorPageError
An error page which can definitely be safely rendered using the OutputPage.
Definition
ErrorPageError.php:35
MediaWiki\Exception\ErrorPageError\SEND_OUTPUT
const SEND_OUTPUT
Definition
ErrorPageError.php:36
MediaWiki\Exception\ThrottledError
Show an error when the user hits a rate limit.
Definition
ThrottledError.php:30
MediaWiki\Exception\ThrottledError\__construct
__construct()
Definition
ThrottledError.php:35
MediaWiki\Exception\ThrottledError\report
report( $action=ErrorPageError::SEND_OUTPUT)
to override
Definition
ThrottledError.php:43
MediaWiki\Exception
Definition
BadRequestError.php:21
includes
exception
ThrottledError.php
Generated on Mon Jul 14 2025 00:23:23 for MediaWiki by
1.10.0