UNA
|
Public Member Functions | |
isMimeTypeSupported ($sMimeType) | |
getFileUrl ($mixedHandler) | |
getFileUrlNotReady ($mixedHandler) | |
Public Member Functions inherited from BxDolTranscoder | |
onDeleteFileLocal ($iFileId) | |
onDeleteFileOrig ($mixedHandler) | |
registerHandlers () | |
unregisterHandlers () | |
cleanup () | |
getStorage () | |
getDb () | |
isMimeTypeSupported ($sMimeType) | |
getFileUrl ($mixedHandler) | |
getFileUrlById ($mixedHandler) | |
isFileReady ($mixedHandler, $isCheckOutdated=true) | |
transcode ($mixedHandler, $iProfileId=0) | |
prune () | |
getFileUrlNotReady ($mixedHandler) | |
getFilterParams ($sName) | |
Additional Inherited Members | |
Static Public Member Functions inherited from BxDolTranscoder | |
static | getObjectInstance ($sObject) |
static | pruning () |
static | processQueue ($bQueuePruning=true) |
static | processCompleted () |
static | registerHandlersArray ($mixed) |
static | registerHandlersSystem () |
static | unregisterHandlersArray ($mixed) |
static | cleanupObjectsArray ($mixed) |
static | onAlertResponseFileDeleteLocal ($oAlert, $sObject) |
static | onAlertResponseFileDeleteOrig ($oAlert, $sObject) |
Protected Member Functions inherited from BxDolTranscoder | |
__construct ($aObject, $oStorage) | |
Static Protected Member Functions inherited from BxDolTranscoder | |
static | getTranscoderObjects () |
This class transcodes images on the fly. Transcoded image is saved in the specified storage engine and next time ready image is served.
To add image transcoder object add record to 'sys_objects_transcoder' table:
Then you need to add image filters to 'sys_transcoder_filters' table:
'Folder' source types: This source type is some folder with original images for the transcoding, the identifier of the image (handler) is file name. The params are the following:
'Storage' source type: The source of original files is Storage engine, the identifier of the image (handler) is file id. The params are the following:
Available filters:
Automatic deletetion of associated data is supported - in the case if original or transcoded file is deleted, but you need to register alert handlers, just call registerHandlers () function to register handler (for example, during module installation) and call unregisterHandlers () function to unregister handlers (for example, during module uninstallation)
Example of usage:
BxDolTranscoderImage::getFileUrl | ( | $mixedHandler | ) |
Get transcoded file url. If transcoded file is ready then direct url to the file is returned. If there is no transcoded data available, then special url is returned, upon opening this url image is transcoded automatically and redirects to the ready transcoed image.
$mixedHandler | - file handler |
BxDolTranscoderImage::getFileUrlNotReady | ( | $mixedHandler | ) |
Get file url when file isn't transcoded yet
BxDolTranscoderImage::isMimeTypeSupported | ( | $sMimeType | ) |
check if transcoder suppors given file mime type