|
| convert () |
| Converts the backup directory.
|
|
| get_id () |
| Get instance identifier. More...
|
|
| get_name () |
| Get converter name. More...
|
|
| get_tempdir_path () |
|
| get_workdir_path () |
|
| log ($message, $level, $a=null, $depth=null, $display=false) |
| This function will be responsible for handling the params, and to call to the corresponding logger->process() once all modifications in params have been performed. More...
|
|
| set_logger ($logger) |
| Sets the logger to use during the conversion. More...
|
|
|
| create_workdir () |
| Prepares a new empty working directory.
|
|
| destroy () |
| Cleans up stuff after the execution. More...
|
|
| execute () |
| Converts the contents of the tempdir into the target format in the workdir. More...
|
|
| init () |
| end of public API ////////////////////////////////////////////////////// More...
|
|
| replace_tempdir () |
| Replaces the source backup directory with the converted version. More...
|
|
|
string | $id |
| unique identifier of this converter instance
|
|
null base_logger | $logger = null |
| logger to use during the conversion
|
|
string | $tempdir |
| the name of the directory containing the unpacked backup being converted
|
|
string | $workdir |
| the name of the directory where the backup is converted to
|
|
◆ description()
static base_converter::description |
( |
| ) |
|
|
staticinherited |
Returns the basic information about the converter.
The returned array must contain the following keys: 'from' - the supported source format, eg. backup::FORMAT_MOODLE1 'to' - the supported target format, eg. backup::FORMAT_MOODLE 'cost' - the cost of the conversion, non-negative non-zero integer
Reimplemented in imscc1_converter, imscc11_export_converter, imscc11_converter, and moodle1_converter.
◆ destroy()
base_converter::destroy |
( |
| ) |
|
|
protectedinherited |
Cleans up stuff after the execution.
Note that we do not know if the execution was successful or not. An exception might have been thrown.
◆ detect_format()
static base_converter::detect_format |
( |
|
$tempdir | ) |
|
|
staticinherited |
Detects the format of the backup directory.
Moodle 2.x format is being detected by the core itself. The converters are therefore supposed to detect the source format. Eventually, if the target format os not backup::FORMAT_MOODLE then they should be able to detect both source and target formats.
- Parameters
-
string | $tempdir | the name of the backup directory |
- Return values
-
null|string | null if not recognized, backup::FORMAT_xxx otherwise |
Reimplemented in imscc1_converter, imscc11_converter, and moodle1_converter.
◆ execute()
imscc1_export_converter::execute |
( |
| ) |
|
|
protected |
Converts the contents of the tempdir into the target format in the workdir.
Reimplemented from base_converter.
◆ get_id()
base_converter::get_id |
( |
| ) |
|
|
inherited |
Get instance identifier.
- Return values
-
string | the unique identifier of this converter instance |
◆ get_name()
base_converter::get_name |
( |
| ) |
|
|
inherited |
Get converter name.
- Return values
-
string | the system name of the converter |
◆ get_tempdir_path()
base_converter::get_tempdir_path |
( |
| ) |
|
|
inherited |
- Return values
-
string | the full path to the directory with the source backup |
◆ get_workdir_path()
base_converter::get_workdir_path |
( |
| ) |
|
|
inherited |
- Return values
-
string | the full path to the working directory |
◆ init()
end of public API //////////////////////////////////////////////////////
Initialize the instance if needed, called by the constructor
Reimplemented in moodle1_converter.
◆ is_available()
static imscc1_export_converter::is_available |
( |
| ) |
|
|
static |
public static methods //////////////////////////////////////////////////
Makes sure that this converter is available at this site
This is intended for eventual PHP extensions check, environment check etc. All checks that do not depend on actual backup data should be done here.
- Return values
-
boolean | true if this converter should be considered as available |
Reimplemented from base_converter.
◆ log()
base_converter::log |
( |
|
$message, |
|
|
|
$level, |
|
|
|
$a = null , |
|
|
|
$depth = null , |
|
|
|
$display = false |
|
) |
| |
|
inherited |
◆ replace_tempdir()
base_converter::replace_tempdir |
( |
| ) |
|
|
protectedinherited |
Replaces the source backup directory with the converted version.
If $CFG->keeptempdirectoriesonbackup is defined, the original source source backup directory is kept for debugging purposes.
◆ set_logger()
base_converter::set_logger |
( |
|
$logger | ) |
|
|
inherited |
Sets the logger to use during the conversion.
- Parameters
-
The documentation for this class was generated from the following file:
- backup/converter/imscc1/backuplib.php