SvgHandler Class Reference

Inherits ImageHandler.

List of all members.

Public Member Functions

 isEnabled ()
 False if the handler is disabled for all files.
 mustRender ($file)
 True if handled types cannot be displayed directly in a browser but can be rendered.
 normaliseParams ($image, &$params)
 Changes the parameter array as necessary, ready for transformation.
 doTransform ($image, $dstPath, $dstUrl, $params, $flags=0)
 Get a MediaTransformOutput object representing the transformed output.
 rasterize ($srcPath, $dstPath, $width, $height)
 getImageSize ($image, $path)
 Get an image size array like that returned by getimagesize(), or false if it can't be determined.
 getThumbType ($ext, $mime)
 Get the thumbnail extension and MIME type for a given source MIME type.
 getLongDesc ($file)


Detailed Description

Definition at line 10 of file SVG.php.


Member Function Documentation

SvgHandler::doTransform ( image,
dstPath,
dstUrl,
params,
flags = 0 
)

Get a MediaTransformOutput object representing the transformed output.

Does the transform unless $flags contains self::TRANSFORM_LATER.

Parameters:
Image $image The image object
string $dstPath Filesystem destination path
string $dstUrl Destination URL to use in output HTML
array $params Arbitrary set of parameters validated by $this->validateParam()
integer $flags A bitfield, may contain self::TRANSFORM_LATER

Reimplemented from MediaHandler.

Definition at line 42 of file SVG.php.

References $flags, $status, $wgSVGConverter, $wgSVGConverterPath, $wgSVGConverters, normaliseParams(), rasterize(), wfMkdirParents(), and wfMsg().

SvgHandler::getImageSize ( image,
path 
)

Get an image size array like that returned by getimagesize(), or false if it can't be determined.

Parameters:
Image $image The image object, or false if there isn't one
string $fileName The filename
Returns:
array

Reimplemented from ImageHandler.

Definition at line 107 of file SVG.php.

References $path, and wfGetSVGsize().

SvgHandler::getLongDesc ( file  ) 

Reimplemented from ImageHandler.

Definition at line 115 of file SVG.php.

References $file, $wgLang, and wfMsgExt().

SvgHandler::getThumbType ( ext,
mime 
)

Get the thumbnail extension and MIME type for a given source MIME type.

Returns:
array thumbnail extension and MIME type

Reimplemented from MediaHandler.

Definition at line 111 of file SVG.php.

SvgHandler::isEnabled (  ) 

False if the handler is disabled for all files.

Reimplemented from MediaHandler.

Definition at line 11 of file SVG.php.

References $wgSVGConverter, $wgSVGConverters, and wfDebug().

SvgHandler::mustRender ( file  ) 

True if handled types cannot be displayed directly in a browser but can be rendered.

Reimplemented from MediaHandler.

Definition at line 21 of file SVG.php.

SvgHandler::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 ImageHandler.

Definition at line 25 of file SVG.php.

References $wgSVGMaxSize, and File::scaleHeight().

Referenced by doTransform().

SvgHandler::rasterize ( srcPath,
dstPath,
width,
height 
)


The documentation for this class was generated from the following file:

Generated on Sat Sep 5 02:08:48 2009 for MediaWiki by  doxygen 1.5.9