MediaWiki
REL1_39
TransformTooBigImageAreaError.php
Go to the documentation of this file.
1
<?php
31
class
TransformTooBigImageAreaError
extends
MediaTransformError
{
32
39
public
function
__construct
( $params, $maxImageArea ) {
40
$msg =
wfMessage
(
'thumbnail_toobigimagearea'
);
41
$msg->params(
42
// messages used: size-pixel, size-kilopixel, size-megapixel, size-gigapixel, size-terapixel,
43
// size-petapixel, size-exapixel, size-zettapixel, size-yottapixel, size-ronnapixel, size-quettapixel
44
$msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000,
"size-$1pixel"
)
45
);
46
47
parent::__construct(
'thumbnail_error'
,
48
max( $params[
'width'
] ?? 0, 120 ),
49
max( $params[
'height'
] ?? 0, 120 ),
50
$msg
51
);
52
}
53
54
public
function
getHttpStatusCode
() {
55
return
400;
56
}
57
}
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition
GlobalFunctions.php:934
MediaTransformError
Basic media transform error class.
Definition
MediaTransformError.php:31
TransformTooBigImageAreaError
Shortcut class for parameter file size errors.
Definition
TransformTooBigImageAreaError.php:31
TransformTooBigImageAreaError\__construct
__construct( $params, $maxImageArea)
Definition
TransformTooBigImageAreaError.php:39
TransformTooBigImageAreaError\getHttpStatusCode
getHttpStatusCode()
Definition
TransformTooBigImageAreaError.php:54
includes
media
TransformTooBigImageAreaError.php
Generated on Mon Nov 25 2024 06:56:12 for MediaWiki by
1.10.0