Class for converting files between different file formats using unoconv.
Copyright: | 2017 Damyon Wiese |
License: | http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
File Size: | 248 lines (8 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
converter:: (8 methods):
get_enabled_plugins()
get_file_storage()
start_conversion()
poll_conversion()
get_next_converter()
get_document_converter_classes()
can_convert_storedfile_to()
can_convert_format_to()
get_enabled_plugins() X-Ref |
Get a list of enabled plugins and classes. return: array List of enabled plugins |
get_file_storage() X-Ref |
Return the file_storage API. This allows for mocking of the file_storage API. return: \file_storage |
start_conversion(stored_file $file, $format, $forcerefresh = false) X-Ref |
Start the conversion for a stored_file into a new format. param: stored_file $file The file to convert param: string $format The desired target file format (file extension) param: boolean $forcerefresh If true, the file will be converted every time (not cached). return: conversion conversion object |
poll_conversion(conversion $conversion) X-Ref |
Poll for updates to the supplied conversion. param: conversion $conversion The conversion in progress return: $this |
get_next_converter($converters, $currentconverter = null) X-Ref |
Fetch the next converter to try. param: array $converters The list of converters to try param: string|null $currentconverter The converter currently in use return: string|false Name of next converter if present |
get_document_converter_classes($from, $to) X-Ref |
Fetch the class for the preferred document converter. param: string $from The source target file (file extension) param: string $to The desired target file format (file extension) return: string The class for document conversion |
can_convert_storedfile_to(stored_file $file, $to) X-Ref |
Check whether document conversion is supported for this file and target format. param: stored_file $file The file to convert param: string $to The desired target file format (file extension) return: bool Whether the target type can be converted |
can_convert_format_to($from, $to) X-Ref |
Check whether document conversion is supported for this file and target format. param: string $from The source target file (file extension) param: string $to The desired target file format (file extension) return: bool Whether the target type can be converted |