| [ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Base class for the output of file transformation methods. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
| File Size: | 476 lines (14 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
ThumbnailImage:: (2 methods):
__construct()
toHtml()
MediaTransformError:: (5 methods):
__construct()
toHtml()
toText()
getHtmlMsg()
isError()
TransformParameterError:: (1 method):
__construct()
Class: ThumbnailImage - X-Ref
Media transform output for images| __construct( $file, $url, $path = false, $parameters = array() X-Ref |
| Get a thumbnail object from a file and parameters. If $path is set to null, the output file is treated as a source copy. If $path is set to false, no output file will be created. $parameters should include, as a minimum, (file) 'width' and 'height'. It may also include a 'page' parameter for multipage files. param: File $file param: string $url URL path to the thumb param: string|bool $path Filesystem path to the thumb param: array $parameters Associative array of parameters |
| toHtml( $options = array() X-Ref |
| Return HTML <img ... /> tag for the thumbnail, will include width and height attributes and a blank alt text (as required). param: array $options Associative array of options. Boolean options return: string |
Class: TransformParameterError - X-Ref
Shortcut class for parameter validation errors| __construct( $params ) X-Ref |
| No description |
| getWidth() X-Ref |
return: int Width of the output box |
| getHeight() X-Ref |
return: int Height of the output box |
| getFile() X-Ref |
return: File |
| getExtension() X-Ref |
| Get the final extension of the thumbnail. Returns false for scripted transformations. return: string|bool |
| getUrl() X-Ref |
return: string|bool The thumbnail URL |
| getStoragePath() X-Ref |
return: string|bool The permanent thumbnail storage path |
| setStoragePath( $storagePath ) X-Ref |
param: string $storagePath The permanent storage path return: void |
| isError() X-Ref |
| This will be overridden to return true in error classes return: bool |
| hasFile() X-Ref |
| 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. This file may exist as a new file in /tmp, a file in permanent storage, or even refer to the original. return: bool |
| fileIsSource() X-Ref |
| Check if the output thumbnail is the same as the source. This can occur if the requested width was bigger than the source. return: bool |
| getLocalCopyPath() X-Ref |
| Get the path of a file system copy of the thumbnail. Callers should never write to this path. return: string|bool Returns false if there isn't one |
| streamFile( $headers = array() X-Ref |
| Stream the file if there were no errors param: array $headers Additional HTTP headers to send on success return: bool Success |
| linkWrap( $linkAttribs, $contents ) X-Ref |
| Wrap some XHTML text in an anchor tag with the given attributes param: array $linkAttribs param: string $contents return: string |
| getDescLinkAttribs( $title = null, $params = array() X-Ref |
param: string $title param: string|array $params Query parameters to add return: array |
| Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |