Every converter will provide a static method describing the converter. Among the information, there will be the source format, the target format and the cost of the conversion (non-negative integer). For example, this method would return something like this for the moodle1 coverter:
return array('from' => backup::FORMAT_MOODLE1, 'to' => backup::FORMAT_MOODLE, 'cost' => 10);
|
This will help to:
1. make the name of the converter independent on the name of the supported format (in the current Mark's implementation, 'moodle1' is hardcoded for both converter name and the format)
2. prepare the conversion path selector that will construct the path of how a given format should be converted via a chain of installed converters