MediaWiki
master
ThrottledError.php
Go to the documentation of this file.
1
<?php
7
namespace
MediaWiki\Exception
;
8
16
class
ThrottledError
extends
ErrorPageError
{
17
21
public
function
__construct
() {
22
parent::__construct(
23
'actionthrottled'
,
24
'actionthrottledtext'
25
);
26
}
27
29
public
function
report
( $action =
ErrorPageError::SEND_OUTPUT
) {
30
global
$wgOut
;
31
$wgOut
->setStatusCode( 429 );
32
parent::report( $action );
33
}
34
}
35
37
class_alias( ThrottledError::class,
'ThrottledError'
);
$wgOut
if(MW_ENTRY_POINT==='index') if(!defined( 'MW_NO_SESSION') &&MW_ENTRY_POINT !=='cli' $wgOut
Definition
Setup.php:551
MediaWiki\Exception\ErrorPageError
An error page which can definitely be safely rendered using the OutputPage.
Definition
ErrorPageError.php:21
MediaWiki\Exception\ErrorPageError\SEND_OUTPUT
const SEND_OUTPUT
Definition
ErrorPageError.php:22
MediaWiki\Exception\ThrottledError
Show an error when the user hits a rate limit.
Definition
ThrottledError.php:16
MediaWiki\Exception\ThrottledError\__construct
__construct()
Definition
ThrottledError.php:21
MediaWiki\Exception\ThrottledError\report
report( $action=ErrorPageError::SEND_OUTPUT)
to override
Definition
ThrottledError.php:29
MediaWiki\Exception
Definition
BadRequestError.php:7
includes
Exception
ThrottledError.php
Generated on Tue Nov 18 2025 12:24:02 for MediaWiki by
1.10.0