Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Static Public Member Functions | List of all members
core_files\converter_interface Interface Reference

Class for converting files between different file formats. More...

Inheritance diagram for core_files\converter_interface:
fileconverter_googledrive\converter fileconverter_unoconv\converter

Public Member Functions

 get_supported_conversions ()
 A list of the supported conversions. More...
 
 poll_conversion_status (conversion $conversion)
 Poll an existing conversion for status update. More...
 
 start_document_conversion (conversion $conversion)
 Convert a document to a new format and return a conversion object relating to the conversion in progress. More...
 

Static Public Member Functions

static are_requirements_met ()
 Whether the plugin is configured and requirements are met. More...
 
static supports ($from, $to)
 Determine whether a conversion between the two supplied formats is achievable. More...
 

Detailed Description

Class for converting files between different file formats.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ are_requirements_met()

static core_files\converter_interface::are_requirements_met ( )
static

Whether the plugin is configured and requirements are met.

Note: This function may be called frequently and caching is advisable.

Return values
bool

Implemented in fileconverter_unoconv\converter, and fileconverter_googledrive\converter.

◆ get_supported_conversions()

core_files\converter_interface::get_supported_conversions ( )

A list of the supported conversions.

Note: This information is only displayed to administrators.

Return values
string

Implemented in fileconverter_unoconv\converter, and fileconverter_googledrive\converter.

◆ poll_conversion_status()

core_files\converter_interface::poll_conversion_status ( conversion  $conversion)

Poll an existing conversion for status update.

Parameters
conversion$conversionThe file to be converted
Return values
$this

Implemented in fileconverter_unoconv\converter, and fileconverter_googledrive\converter.

◆ start_document_conversion()

core_files\converter_interface::start_document_conversion ( conversion  $conversion)

Convert a document to a new format and return a conversion object relating to the conversion in progress.

Parameters
conversion$conversionThe file to be converted
Return values
$this

◆ supports()

static core_files\converter_interface::supports (   $from,
  $to 
)
static

Determine whether a conversion between the two supplied formats is achievable.

Note: This function may be called frequently and caching is advisable.

Parameters
string$fromThe source type
string$toThe destination type
Return values
bool

Implemented in fileconverter_unoconv\converter, and fileconverter_googledrive\converter.


The documentation for this interface was generated from the following file: