ImgPreview::getPreview result object.
More...
Public Member Functions |
| __construct ($imgPreview=null, $path=false, array $options=array()) |
| __toString () |
| Returns image URL.
|
| isReady () |
| Will return TRUE if the image is ready, or FALSE if it's currently being prepared.
|
| isEmpty () |
| isIcon () |
| isRemote () |
| isPreviewable () |
| offsetExists ($offset) |
| offsetGet ($offset) |
| offsetSet ($offset, $value) |
| offsetUnset ($offset) |
| getUrl () |
| Returns URL of the preview/icon file, or false otherwise.
|
| getFilepath () |
| Returns absolute path of the preview/icon file, or false otherwise.
|
| getSourceFilepath () |
| prepareInfo () |
| getWidth () |
| getHeight () |
| prepareSourceInfo () |
| getSourceWidth () |
| getSourceHeight () |
| getHtmlImg ($withSize=true, $more=false) |
| Returns Html.
|
| getHtmlImgSrc ($withSize=true) |
| Returns src="..." [width="" height=""].
|
| getHtmlSize ($css=false) |
| getHtmlBackground ($withSize=true) |
| Returns background-image:url('...')
|
Static Public Member Functions |
static | buildStaticResult ($imgPreview, $previewFile, $previewUrl=false) |
Data Fields |
| $imgPreview |
| $path |
| path/url to the file.
|
| $sourceFile |
| actual source file to use for generating previews - cached file for urls this variable will be cleared as soon as preview is generated.
|
| $previewFile |
| generated preview, or icon file
|
| $previewType |
| $previewUrl |
| generated preview, or icon URL
|
| $extension |
| files extension.
|
| $options |
| Options array.
|
| $sourceWidth = null |
| $sourceHeight = null |
| $sourceRect = array() |
| Rectangle to use as a preview source (x,y,width,height)
|
| $x = 0 |
| $y = 0 |
| $width = null |
| $height = null |
| $isResumed |
Static Protected Attributes |
static | $fieldMap |
Detailed Description
ImgPreview::getPreview result object.
You can use it as a string - it will be converted to image/icon URL, or empty string if there is no preview You can use it as an array to retrieve specific data (for legacy purposes)
Constructor & Destructor Documentation
ImgPreviewResult::__construct |
( |
$ |
imgPreview = null , |
|
|
$ |
path = false , |
|
|
array $ |
options = array() |
|
) |
| |
Member Function Documentation
ImgPreviewResult::__toString |
( |
| ) |
|
static ImgPreviewResult::buildStaticResult |
( |
$ |
imgPreview, |
|
|
$ |
previewFile, |
|
|
$ |
previewUrl = false |
|
) |
| [static] |
ImgPreviewResult::getFilepath |
( |
| ) |
|
Returns absolute path of the preview/icon file, or false otherwise.
ImgPreviewResult::getHeight |
( |
| ) |
|
ImgPreviewResult::getHtmlBackground |
( |
$ |
withSize = true | ) |
|
Returns background-image:url('...')
- Parameters:
-
$more | additional parameters to put inside |
ImgPreviewResult::getHtmlImg |
( |
$ |
withSize = true , |
|
|
$ |
more = false |
|
) |
| |
Returns Html.
<img src="..." [width="" height=""] /> code
- Parameters:
-
$more | additional parameters to put inside |
ImgPreviewResult::getHtmlImgSrc |
( |
$ |
withSize = true | ) |
|
Returns src="..." [width="" height=""].
ImgPreviewResult::getHtmlSize |
( |
$ |
css = false | ) |
|
ImgPreviewResult::getSourceFilepath |
( |
| ) |
|
ImgPreviewResult::getSourceHeight |
( |
| ) |
|
ImgPreviewResult::getSourceWidth |
( |
| ) |
|
ImgPreviewResult::getUrl |
( |
| ) |
|
Returns URL of the preview/icon file, or false otherwise.
ImgPreviewResult::getWidth |
( |
| ) |
|
ImgPreviewResult::isEmpty |
( |
| ) |
|
ImgPreviewResult::isIcon |
( |
| ) |
|
ImgPreviewResult::isPreviewable |
( |
| ) |
|
ImgPreviewResult::isReady |
( |
| ) |
|
Will return TRUE if the image is ready, or FALSE if it's currently being prepared.
ImgPreviewResult::isRemote |
( |
| ) |
|
ImgPreviewResult::offsetExists |
( |
$ |
offset | ) |
|
ImgPreviewResult::offsetGet |
( |
$ |
offset | ) |
|
ImgPreviewResult::offsetSet |
( |
$ |
offset, |
|
|
$ |
value |
|
) |
| |
ImgPreviewResult::offsetUnset |
( |
$ |
offset | ) |
|
ImgPreviewResult::prepareInfo |
( |
| ) |
|
ImgPreviewResult::prepareSourceInfo |
( |
| ) |
|
Field Documentation
ImgPreviewResult::$extension |
files extension.
special extensions are "url" (unknown original extension) and "dir"
ImgPreviewResult::$fieldMap [static, protected] |
Initial value: array(
'path' => 'sourceFile',
'imagesrc' => 'previewUrl',
'image' => 'previewFile',
'ico' => 'isIcon()',
'w' => 'getWidth()',
'h' => 'getHeight()',
)
ImgPreviewResult::$height = null |
ImgPreviewResult::$imgPreview |
ImgPreviewResult::$isResumed |
ImgPreviewResult::$options |
path/url to the file.
If url is cached already, cached file path will be here
ImgPreviewResult::$previewFile |
generated preview, or icon file
ImgPreviewResult::$previewType |
ImgPreviewResult::$previewUrl |
generated preview, or icon URL
ImgPreviewResult::$sourceFile |
actual source file to use for generating previews - cached file for urls this variable will be cleared as soon as preview is generated.
Use $path instead.
ImgPreviewResult::$sourceHeight = null |
ImgPreviewResult::$sourceRect = array() |
Rectangle to use as a preview source (x,y,width,height)
ImgPreviewResult::$sourceWidth = null |
ImgPreviewResult::$width = null |
The documentation for this class was generated from the following file: