MediaWiki
master
TransformTooBigImageAreaError.php
Go to the documentation of this file.
1
<?php
10
namespace
MediaWiki\Media
;
11
19
class
TransformTooBigImageAreaError
extends
MediaTransformError
{
20
27
public
function
__construct
( $params, $maxImageArea ) {
28
$msg =
wfMessage
(
'thumbnail_toobigimagearea'
);
29
$msg->params(
30
// messages used: size-pixel, size-kilopixel, size-megapixel, size-gigapixel, size-terapixel,
31
// size-petapixel, size-exapixel, size-zettapixel, size-yottapixel, size-ronnapixel, size-quettapixel
32
$msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000,
"size-$1pixel"
)
33
);
34
35
parent::__construct(
'thumbnail_error'
,
36
max( $params[
'width'
] ?? 0, 120 ),
37
max( $params[
'height'
] ?? 0, 120 ),
38
$msg
39
);
40
}
41
43
public
function
getHttpStatusCode
() {
44
return
400;
45
}
46
}
47
49
class_alias( TransformTooBigImageAreaError::class,
'TransformTooBigImageAreaError'
);
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition
GlobalFunctions.php:821
MediaWiki\Media\MediaTransformError
Basic media transform error class.
Definition
MediaTransformError.php:23
MediaWiki\Media\TransformTooBigImageAreaError
Shortcut class for parameter file size errors.
Definition
TransformTooBigImageAreaError.php:19
MediaWiki\Media\TransformTooBigImageAreaError\__construct
__construct( $params, $maxImageArea)
Definition
TransformTooBigImageAreaError.php:27
MediaWiki\Media\TransformTooBigImageAreaError\getHttpStatusCode
getHttpStatusCode()
to overrideint
Definition
TransformTooBigImageAreaError.php:43
MediaWiki\Media
Definition
BitmapHandler.php:10
includes
Media
TransformTooBigImageAreaError.php
Generated on Wed Jan 14 2026 00:25:32 for MediaWiki by
1.10.0