Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1425641
BitmapHandler_ClientOnly.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
BitmapHandler_ClientOnly.php
View Options
<?php
/**
* Handler for bitmap images that will be resized by clients.
*
* @license GPL-2.0-or-later
* @file
* @ingroup Media
*/
use
MediaWiki\FileRepo\File\File
;
/**
* Handler for bitmap images that will be resized by clients.
*
* This is not used by default but can be assigned to some image types
* using $wgMediaHandlers.
*
* @ingroup Media
*/
// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
class
BitmapHandler_ClientOnly
extends
BitmapHandler
{
/**
* @param File $image
* @param array &$params
* @return bool
*/
public
function
normaliseParams
(
$image
,
&
$params
)
{
return
ImageHandler
::
normaliseParams
(
$image
,
$params
);
}
/**
* @param File $image
* @param string $dstPath
* @param string $dstUrl
* @param array $params
* @param int $flags
* @return ThumbnailImage|TransformParameterError
*/
public
function
doTransform
(
$image
,
$dstPath
,
$dstUrl
,
$params
,
$flags
=
0
)
{
if
(
!
$this
->
normaliseParams
(
$image
,
$params
)
)
{
return
new
TransformParameterError
(
$params
);
}
return
new
ThumbnailImage
(
$image
,
$image
->
getUrl
(),
$image
->
getLocalRefPath
(),
$params
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 11:45 (16 h, 44 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
cc/99/698044e74403bf4dc152847177bb
Default Alt Text
BitmapHandler_ClientOnly.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment