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 295 of file Generic.php.
ImageHandler::canRender | ( | $ | file | ) |
True if the handled types can be transformed.
Reimplemented from MediaHandler.
Reimplemented in TiffHandler.
Definition at line 296 of file Generic.php.
References $file.
ImageHandler::getDimensionsString | ( | $ | file | ) |
Reimplemented from MediaHandler.
Definition at line 437 of file Generic.php.
References $file, $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 | $image The image object, or false if there isn't one | |
string | $fileName The filename |
Reimplemented from MediaHandler.
Reimplemented in BmpHandler, DjVuHandler, and SvgHandler.
Definition at line 412 of file Generic.php.
References $path, wfRestoreWarnings(), and wfSuppressWarnings().
ImageHandler::getLongDesc | ( | $ | file | ) |
Reimplemented from MediaHandler.
Reimplemented in SvgHandler.
Definition at line 428 of file Generic.php.
References $file, $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 304 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 400 of file Generic.php.
References $page, $script, $url, getScriptParams(), normaliseParams(), and wfArrayToCGI().
ImageHandler::getScriptParams | ( | $ | params | ) |
Reimplemented in DjVuHandler.
Definition at line 342 of file Generic.php.
Referenced by getScriptedTransform().
ImageHandler::getShortDesc | ( | $ | file | ) |
Reimplemented from MediaHandler.
Definition at line 419 of file Generic.php.
References $file, $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 372 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 320 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 346 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 333 of file Generic.php.
ImageHandler::validateParam | ( | $ | name, | |
$ | value | |||
) |
Reimplemented from MediaHandler.
Reimplemented in DjVuHandler.
Definition at line 308 of file Generic.php.
References $name.
ImageHandler::validateThumbParams | ( | &$ | width, | |
&$ | height, | |||
$ | srcWidth, | |||
$ | srcHeight, | |||
$ | mimeType | |||
) |
Validate thumbnail parameters and fill in the correct height.
integer | &$width Specified width (input/output) | |
integer | &$height Height (output only) |
Definition at line 383 of file Generic.php.
References File::scaleHeight(), and wfDebug().
Referenced by normaliseParams().