|
eZ Publish
[4.2]
|
The class eZImageHandler does. More...
Inheritance diagram for eZImageHandler:Public Member Functions | |
| conversionRules () | |
| convert ($manager, $sourceMimeData, &$destinationMimeData, $filters=false) | |
| eZImageHandler ($handlerName, $isEnabled=true, $outputRewriteType=self::REPLACE_SUFFIX, $supportedInputMIMETypes=false, $supportedOutputMIMETypes, $conversionRules=false, $filters=false, $mimeTagMap=false) | |
| isAvailable () | |
| isFilterSupported ($filter) | |
| isInputMIMETypeSupported ($mimeData) | |
| isOutputMIMETypeSupported ($mimeData) | |
| outputMIMEType (&$manager, $currentMimeData, $wantedMimeData, $supportedFormatsOriginal, $aliasName=false) | |
| outputRewriteType () | |
| supportedImageFilters () | |
| supportedInputMIMETypes () | |
| supportedOutputMIMETypes () | |
| tagForMIMEType ($mimeData) | |
| textForFilter ($filterData) | |
Static Public Member Functions | |
| static | changeFilePermissions ($filepath) |
| static | convertFilterToText ($filterDefinition, $filterData) |
| static | createFilterDefinitionFromINI ($filterText) |
| static | rewriteURL ($originalMimeData, &$destinationMimeData, $rewriteType, $aliasName=false) |
| static | wildcardToRegexp ($wildcard, $separatorCharacter=false) |
Public Attributes | |
| const | KEEP_SUFFIX = 1 |
| const | PREPEND_TAG_REPLACE_SUFFIX = 3 |
| const | REPLACE_SUFFIX = 2 |
The class eZImageHandler does.
Definition at line 41 of file ezimagehandler.php.
| static eZImageHandler::changeFilePermissions | ( | $ | filepath | ) | [static] |
Changes the file permissions for image file $filepath to the ones defines in image.ini. It uses the group FileSettings and variable ImagePermissions.
true on success, false otherwise Definition at line 266 of file ezimagehandler.php.
Referenced by eZImageShellHandler\convert(), and eZImageGDHandler\convert().
| eZImageHandler::conversionRules | ( | ) |
Definition at line 128 of file ezimagehandler.php.
Referenced by outputMIMEType().
| eZImageHandler::convert | ( | $ | manager, |
| $ | sourceMimeData, | ||
| &$ | destinationMimeData, | ||
| $ | filters = false |
||
| ) | [pure virtual] |
Converts the source file $sourceMimeData to the destination file $destinationMimeData. If $filters is supplied then the filters will be applied to the conversion.
Implemented in eZImageGDHandler, and eZImageShellHandler.
Definition at line 471 of file ezimagehandler.php.
| static eZImageHandler::convertFilterToText | ( | $ | filterDefinition, |
| $ | filterData | ||
| ) | [static] |
Converts a filter definition and filter data into a text string. This string is usually the commandline parameter.
Definition at line 156 of file ezimagehandler.php.
Referenced by textForFilter().
| static eZImageHandler::createFilterDefinitionFromINI | ( | $ | filterText | ) | [static] |
Parses the filter text $filterText which is taken from an INI file and returns a filter definition structure for it.
Definition at line 137 of file ezimagehandler.php.
Referenced by eZImageShellHandler\createFromINI().
| eZImageHandler::eZImageHandler | ( | $ | handlerName, |
| $ | isEnabled = true, |
||
| $ | outputRewriteType = self::REPLACE_SUFFIX, |
||
| $ | supportedInputMIMETypes = false, |
||
| $ | supportedOutputMIMETypes, | ||
| $ | conversionRules = false, |
||
| $ | filters = false, |
||
| $ | mimeTagMap = false |
||
| ) |
Initializes the image handler with data sent from the inheriting class.
| $handlerName | The name of the current handler |
| $isEnabled | A boolean which tells whether the handler can be used or not |
| $outputRewriteType | Defines how output filenames are rewritten |
| $supportedInputMIMETypes | A list of MIME-Types the handler supports as input or false if no type as defined |
| $supportedOutputMIMETypes | A list of MIME-Types the handler supports as output or false if no type as defined |
| $conversionRules | A list of conversion rules specific for this handler, is combined with the global rules |
| $filters | A list of filters this handler supports |
| $mimeTagMap | A mapping table which maps from a MIME-Type to a specific tag, this tag can be used when rewriting the filename. |
Definition at line 58 of file ezimagehandler.php.
Referenced by eZImageGDHandler\eZImageGDHandler(), and eZImageShellHandler\eZImageShellHandler().
| eZImageHandler::isAvailable | ( | ) |
Implementors of image handlers should implement this to return true if the image conversion system to be used is available, for instance to check for a PHP extension.
true. Definition at line 94 of file ezimagehandler.php.
| eZImageHandler::isFilterSupported | ( | $ | filter | ) |
true if the filter $filter is supported by this handler. Definition at line 461 of file ezimagehandler.php.
| eZImageHandler::isInputMIMETypeSupported | ( | $ | mimeData | ) |
true if the MIME-Type defined in $mimeData is supported as input by this handler. Definition at line 336 of file ezimagehandler.php.
Referenced by outputMIMEType().
| eZImageHandler::isOutputMIMETypeSupported | ( | $ | mimeData | ) |
true if the MIME-Type defined in $mimeData is supported as output by this handler. Definition at line 309 of file ezimagehandler.php.
Referenced by outputMIMEType().
| eZImageHandler::outputMIMEType | ( | &$ | manager, |
| $ | currentMimeData, | ||
| $ | wantedMimeData, | ||
| $ | supportedFormatsOriginal, | ||
| $ | aliasName = false |
||
| ) |
Figures out the output MIME type for the $currentMimeData. It goes trough all conversion rules for this handler and returns a MIME structure for the possible output. The returned structure also contains the correct url for the output.
| $wantedMimeData | an optional MIME structure for the wanted output type, if a direct conversion rule exists from $currentMimeData to $wantedMimeData then this is used. |
| $aliasName | An optional name for the current alias being used, if supplied the output MIME structure will have the alias name in the filename. |
Definition at line 370 of file ezimagehandler.php.
| eZImageHandler::outputRewriteType | ( | ) |
Definition at line 453 of file ezimagehandler.php.
Referenced by outputMIMEType().
| static eZImageHandler::rewriteURL | ( | $ | originalMimeData, |
| &$ | destinationMimeData, | ||
| $ | rewriteType, | ||
| $ | aliasName = false |
||
| ) | [static] |
Rewrites the URL in $originalMimeData to become a url for $destinationMimeData. The type of rewrite is determined by $rewriteType which can be one of:
Definition at line 195 of file ezimagehandler.php.
Referenced by outputMIMEType().
| eZImageHandler::supportedImageFilters | ( | ) |
Definition at line 120 of file ezimagehandler.php.
| eZImageHandler::supportedInputMIMETypes | ( | ) |
Definition at line 244 of file ezimagehandler.php.
Referenced by isInputMIMETypeSupported().
| eZImageHandler::supportedOutputMIMETypes | ( | ) |
Definition at line 255 of file ezimagehandler.php.
Referenced by isOutputMIMETypeSupported().
| eZImageHandler::tagForMIMEType | ( | $ | mimeData | ) |
Definition at line 105 of file ezimagehandler.php.
Referenced by eZImageShellHandler\convert(), and rewriteURL().
| eZImageHandler::textForFilter | ( | $ | filterData | ) |
Calls convertFilterToText with the correct filter definition and returns the text.
Definition at line 176 of file ezimagehandler.php.
Referenced by eZImageShellHandler\convert().
| static eZImageHandler::wildcardToRegexp | ( | $ | wildcard, |
| $ | separatorCharacter = false |
||
| ) | [static] |
Creats a regexp string out of the wildcard $wilcard and returns it.
Definition at line 287 of file ezimagehandler.php.
Referenced by isInputMIMETypeSupported(), isOutputMIMETypeSupported(), and outputMIMEType().
| const eZImageHandler::KEEP_SUFFIX = 1 |
Definition at line 43 of file ezimagehandler.php.
Definition at line 45 of file ezimagehandler.php.
| const eZImageHandler::REPLACE_SUFFIX = 2 |
Definition at line 44 of file ezimagehandler.php.
Referenced by eZImageShellHandler\createFromINI(), and eZImageGDHandler\createFromINI().