MediaWiki  master
TransformParameterError.php
Go to the documentation of this file.
1 <?php
30  public function __construct( $params ) {
31  parent::__construct( 'thumbnail_error',
32  max( $params['width'] ?? 0, 120 ),
33  max( $params['height'] ?? 0, 120 ),
34  wfMessage( 'thumbnail_invalid_params' )
35  );
36  }
37 
38  public function getHttpStatusCode() {
39  return 400;
40  }
41 }
MediaTransformError
Basic media transform error class.
Definition: MediaTransformError.php:29
TransformParameterError\getHttpStatusCode
getHttpStatusCode()
Definition: TransformParameterError.php:38
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition: GlobalFunctions.php:1198
TransformParameterError\__construct
__construct( $params)
Definition: TransformParameterError.php:30
TransformParameterError
Shortcut class for parameter validation errors.
Definition: TransformParameterError.php:29