MediaWiki  master
BitmapHandler_ClientOnly.php
Go to the documentation of this file.
1 <?php
32 // phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
34 
40  public function normaliseParams( $image, &$params ) {
41  return ImageHandler::normaliseParams( $image, $params );
42  }
43 
52  public function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
53  if ( !$this->normaliseParams( $image, $params ) ) {
54  return new TransformParameterError( $params );
55  }
56 
57  return new ThumbnailImage( $image, $image->getUrl(), $image->getLocalRefPath(), $params );
58  }
59 }
ThumbnailImage
Media transform output for images.
Definition: ThumbnailImage.php:29
BitmapHandler_ClientOnly\doTransform
doTransform( $image, $dstPath, $dstUrl, $params, $flags=0)
Definition: BitmapHandler_ClientOnly.php:52
BitmapHandler
Generic handler for bitmap images.
Definition: BitmapHandler.php:32
BitmapHandler_ClientOnly\normaliseParams
normaliseParams( $image, &$params)
Definition: BitmapHandler_ClientOnly.php:40
ImageHandler\normaliseParams
normaliseParams( $image, &$params)
Changes the parameter array as necessary, ready for transformation.Should be idempotent....
Definition: ImageHandler.php:113
TransformParameterError
Shortcut class for parameter validation errors.
Definition: TransformParameterError.php:30
BitmapHandler_ClientOnly
Handler for bitmap images that will be resized by clients.
Definition: BitmapHandler_ClientOnly.php:33