|
eZ Publish
[trunk]
|
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 () | |
| rewriteURL ($originalMimeData, &$destinationMimeData, $rewriteType, $aliasName=false) | |
| supportedImageFilters () | |
| supportedInputMIMETypes () | |
| supportedOutputMIMETypes () | |
| tagForMIMEType ($mimeData) | |
| textForFilter ($filterData) | |
Static Public Member Functions | |
| static | changeFilePermissions ($filepath) |
| static | convertFilterToText ($filterDefinition, $filterData) |
| static | createFilterDefinitionFromINI ($filterText) |
| 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 18 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 243 of file ezimagehandler.php.
Referenced by eZImageShellHandler\convert(), and eZImageGDHandler\convert().
Definition at line 105 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 447 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 133 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 114 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 35 of file ezimagehandler.php.
Referenced by eZImageGDHandler\eZImageGDHandler(), and eZImageShellHandler\eZImageShellHandler().
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 71 of file ezimagehandler.php.
| eZImageHandler::isFilterSupported | ( | $ | filter | ) |
true if the filter $filter is supported by this handler. Definition at line 437 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 312 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 285 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 346 of file ezimagehandler.php.
Definition at line 429 of file ezimagehandler.php.
Referenced by outputMIMEType().
| eZImageHandler::rewriteURL | ( | $ | originalMimeData, |
| &$ | destinationMimeData, | ||
| $ | rewriteType, | ||
| $ | aliasName = false |
||
| ) |
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 172 of file ezimagehandler.php.
Referenced by outputMIMEType().
Definition at line 97 of file ezimagehandler.php.
Definition at line 221 of file ezimagehandler.php.
Referenced by isInputMIMETypeSupported().
Definition at line 232 of file ezimagehandler.php.
Referenced by isOutputMIMETypeSupported().
| eZImageHandler::tagForMIMEType | ( | $ | mimeData | ) |
Definition at line 82 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 153 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 263 of file ezimagehandler.php.
Referenced by isInputMIMETypeSupported(), isOutputMIMETypeSupported(), and outputMIMEType().
| const eZImageHandler::KEEP_SUFFIX = 1 |
Definition at line 20 of file ezimagehandler.php.
Definition at line 22 of file ezimagehandler.php.
| const eZImageHandler::REPLACE_SUFFIX = 2 |
Definition at line 21 of file ezimagehandler.php.
Referenced by eZImageShellHandler\createFromINI(), and eZImageGDHandler\createFromINI().