MediaWiki
REL1_22
|
Base class for the output of MediaHandler::doTransform() and File::transform(). More...
Public Member Functions | |
fileIsSource () | |
Check if the output thumbnail is the same as the source. | |
getDescLinkAttribs ($title=null, $params=array()) | |
getExtension () | |
Get the final extension of the thumbnail. | |
getHeight () | |
getLocalCopyPath () | |
Get the path of a file system copy of the thumbnail. | |
getStoragePath () | |
getUrl () | |
getWidth () | |
hasFile () | |
Check if an output thumbnail file actually exists. | |
isError () | |
This will be overridden to return true in error classes. | |
setStoragePath ($storagePath) | |
streamFile ($headers=array()) | |
Stream the file if there were no errors. | |
toHtml ($options=array()) | |
Fetch HTML for this transform output. | |
Public Attributes | |
File | $file |
$height | |
$lang | |
$page | |
$path | |
array | $responsiveUrls = array() |
Associative array mapping optional supplementary image files from pixel density (eg 1.5 or 2) to additional URLs. | |
$url | |
$width | |
Protected Member Functions | |
linkWrap ($linkAttribs, $contents) | |
Wrap some XHTML text in an anchor tag with the given attributes. | |
Protected Attributes | |
$storagePath = false |
Base class for the output of MediaHandler::doTransform() and File::transform().
Definition at line 29 of file MediaTransformOutput.php.
Check if the output thumbnail is the same as the source.
This can occur if the requested width was bigger than the source.
Definition at line 138 of file MediaTransformOutput.php.
MediaTransformOutput::getDescLinkAttribs | ( | $ | title = null , |
$ | params = array() |
||
) |
$title | string |
$params | string|array Query parameters to add |
Definition at line 201 of file MediaTransformOutput.php.
Get the final extension of the thumbnail.
Returns false for scripted transformations.
Definition at line 62 of file MediaTransformOutput.php.
Definition at line 53 of file MediaTransformOutput.php.
Get the path of a file system copy of the thumbnail.
Callers should never write to this path.
Definition at line 148 of file MediaTransformOutput.php.
Definition at line 76 of file MediaTransformOutput.php.
Definition at line 69 of file MediaTransformOutput.php.
Definition at line 46 of file MediaTransformOutput.php.
Check if an output thumbnail file actually exists.
This will return false if there was an error, the thumbnail is to be handled client-side only, or if transformation was deferred via TRANSFORM_LATER.
Definition at line 126 of file MediaTransformOutput.php.
This will be overridden to return true in error classes.
Reimplemented in MediaTransformError.
Definition at line 114 of file MediaTransformOutput.php.
MediaTransformOutput::linkWrap | ( | $ | linkAttribs, |
$ | contents | ||
) | [protected] |
Wrap some XHTML text in an anchor tag with the given attributes.
$linkAttribs | array |
$contents | string |
Definition at line 188 of file MediaTransformOutput.php.
MediaTransformOutput::setStoragePath | ( | $ | storagePath | ) |
string | $storagePath | The permanent storage path |
Definition at line 84 of file MediaTransformOutput.php.
MediaTransformOutput::streamFile | ( | $ | headers = array() | ) |
Stream the file if there were no errors.
array | $headers | Additional HTTP headers to send on success |
Definition at line 169 of file MediaTransformOutput.php.
MediaTransformOutput::toHtml | ( | $ | options = array() | ) | [abstract] |
Fetch HTML for this transform output.
array | $options | Associative array of options. Boolean options should be indicated with a value of true for true, and false or absent for false. |
alt Alternate text or caption desc-link Boolean, show a description link file-link Boolean, show a file download link custom-url-link Custom URL to link to custom-title-link Custom Title object to link to valign vertical-align property, if the output is an inline element img-class Class applied to the "<img>" tag, if there is such a tag
For images, desc-link and file-link are implemented as a click-through. For sounds and videos, they may be displayed in other ways.
Reimplemented in MediaTransformError, and ThumbnailImage.
Definition at line 32 of file MediaTransformOutput.php.
MediaTransformOutput::$height |
Reimplemented in MediaTransformError.
Definition at line 34 of file MediaTransformOutput.php.
MediaTransformOutput::$lang |
Definition at line 34 of file MediaTransformOutput.php.
MediaTransformOutput::$page |
Definition at line 34 of file MediaTransformOutput.php.
MediaTransformOutput::$path |
Reimplemented in MediaTransformError.
Definition at line 34 of file MediaTransformOutput.php.
Associative array mapping optional supplementary image files from pixel density (eg 1.5 or 2) to additional URLs.
Definition at line 39 of file MediaTransformOutput.php.
MediaTransformOutput::$storagePath = false [protected] |
Definition at line 41 of file MediaTransformOutput.php.
MediaTransformOutput::$url |
Reimplemented in MediaTransformError.
Definition at line 34 of file MediaTransformOutput.php.
MediaTransformOutput::$width |
Reimplemented in MediaTransformError.
Definition at line 34 of file MediaTransformOutput.php.