MediaWiki master
BitmapHandler_ClientOnly.php
Go to the documentation of this file.
1<?php
10namespace MediaWiki\Media;
11
13
22// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
24
30 public function normaliseParams( $image, &$params ) {
31 return ImageHandler::normaliseParams( $image, $params );
32 }
33
42 public function doTransform( $image, $dstPath, $dstUrl, $params, $flags = 0 ) {
43 if ( !$this->normaliseParams( $image, $params ) ) {
44 return new TransformParameterError( $params );
45 }
46
47 return new ThumbnailImage( $image, $image->getUrl(), $image->getLocalRefPath(), $params );
48 }
49}
50
52class_alias( BitmapHandler_ClientOnly::class, 'BitmapHandler_ClientOnly' );
Implements some public methods and some protected utility functions which are required by multiple ch...
Definition File.php:79
Handler for bitmap images that will be resized by clients.
doTransform( $image, $dstPath, $dstUrl, $params, $flags=0)
Generic handler for bitmap images.
normaliseParams( $image, &$params)
Changes the parameter array as necessary, ready for transformation.Should be idempotent....
Media transform output for images.
Shortcut class for parameter validation errors.