Inherits MediaHandler.
Inherited by BitmapHandler, DjVuHandler, and SvgHandler.
Public Member Functions | |
canRender ($file) | |
True if the handled types can be transformed. | |
getParamMap () | |
Get an associative array mapping magic word IDs to parameter names. | |
validateParam ($name, $value) | |
makeParamString ($params) | |
Merge a parameter array into a string appropriate for inclusion in filenames. | |
parseParamString ($str) | |
Parse a param string made with makeParamString back into an array. | |
getScriptParams ($params) | |
normaliseParams ($image, &$params) | |
Changes the parameter array as necessary, ready for transformation. | |
getTransform ($image, $dstPath, $dstUrl, $params) | |
Get a transform output object without actually doing the transform. | |
validateThumbParams (&$width, &$height, $srcWidth, $srcHeight, $mimeType) | |
Validate thumbnail parameters and fill in the correct height. | |
getScriptedTransform ($image, $script, $params) | |
Get a MediaTransformOutput object representing an alternate of the transformed output which will call an intermediary thumbnail assist script. | |
getImageSize ($image, $path) | |
Get an image size array like that returned by getimagesize(), or false if it can't be determined. | |
getShortDesc ($file) | |
getLongDesc ($file) | |
getDimensionsString ($file) |
Definition at line 303 of file Generic.php.
ImageHandler::canRender | ( | $ | file | ) |
True if the handled types can be transformed.
Reimplemented from MediaHandler.
Reimplemented in TiffHandler.
Definition at line 304 of file Generic.php.
ImageHandler::getDimensionsString | ( | $ | file | ) |
Reimplemented from MediaHandler.
Definition at line 445 of file Generic.php.
References $wgLang, wfMsg(), and wfMsgExt().
ImageHandler::getImageSize | ( | $ | image, | |
$ | path | |||
) |
Get an image size array like that returned by getimagesize(), or false if it can't be determined.
$image | File: the image object, or false if there isn't one | |
$fileName | String: the filename |
Reimplemented from MediaHandler.
Reimplemented in BmpHandler, DjVuHandler, and SvgHandler.
Definition at line 420 of file Generic.php.
References $path, wfRestoreWarnings(), and wfSuppressWarnings().
ImageHandler::getLongDesc | ( | $ | file | ) |
Reimplemented from MediaHandler.
Reimplemented in GIFHandler, and SvgHandler.
Definition at line 436 of file Generic.php.
References $wgLang, and wfMsgExt().
ImageHandler::getParamMap | ( | ) |
Get an associative array mapping magic word IDs to parameter names.
Will be used by the parser to identify parameters.
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 312 of file Generic.php.
ImageHandler::getScriptedTransform | ( | $ | image, | |
$ | script, | |||
$ | params | |||
) |
Get a MediaTransformOutput object representing an alternate of the transformed output which will call an intermediary thumbnail assist script.
Used when the repository has a thumbnailScriptUrl option configured.
Return false to fall back to the regular getTransform().
Reimplemented from MediaHandler.
Definition at line 408 of file Generic.php.
References $page, $script, $url, getScriptParams(), normaliseParams(), and wfArrayToCGI().
ImageHandler::getScriptParams | ( | $ | params | ) |
Reimplemented in DjVuHandler.
Definition at line 350 of file Generic.php.
Referenced by getScriptedTransform().
ImageHandler::getShortDesc | ( | $ | file | ) |
Reimplemented from MediaHandler.
Definition at line 427 of file Generic.php.
References $wgLang, wfMsgExt(), and wfMsgHtml().
ImageHandler::getTransform | ( | $ | image, | |
$ | dstPath, | |||
$ | dstUrl, | |||
$ | params | |||
) |
Get a transform output object without actually doing the transform.
Reimplemented from MediaHandler.
Definition at line 380 of file Generic.php.
References MediaHandler::doTransform().
ImageHandler::makeParamString | ( | $ | params | ) |
Merge a parameter array into a string appropriate for inclusion in filenames.
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 328 of file Generic.php.
ImageHandler::normaliseParams | ( | $ | image, | |
&$ | params | |||
) |
Changes the parameter array as necessary, ready for transformation.
Should be idempotent. Returns false if the parameters are unacceptable and the transform should fail
Reimplemented from MediaHandler.
Reimplemented in BitmapHandler, BitmapHandler_ClientOnly, and SvgHandler.
Definition at line 354 of file Generic.php.
References File::scaleHeight(), validateThumbParams(), and wfFitBoxWidth().
Referenced by DjVuHandler::doTransform(), and getScriptedTransform().
ImageHandler::parseParamString | ( | $ | str | ) |
Parse a param string made with makeParamString back into an array.
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 341 of file Generic.php.
ImageHandler::validateParam | ( | $ | name, | |
$ | value | |||
) |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 316 of file Generic.php.
References $name.
ImageHandler::validateThumbParams | ( | &$ | width, | |
&$ | height, | |||
$ | srcWidth, | |||
$ | srcHeight, | |||
$ | mimeType | |||
) |
Validate thumbnail parameters and fill in the correct height.
$width | Integer: specified width (input/output) | |
$height | Integer: height (output only) |
Definition at line 391 of file Generic.php.
References File::scaleHeight(), and wfDebug().
Referenced by normaliseParams().