|
| 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...
|
|
|
static | description () |
| Returns the basic information about the converter. More...
|
|
static | detect_format ($tempdir) |
| Detects the Common Cartridge 1.0 format of the backup directory. More...
|
|
static | is_available () |
| public static methods ////////////////////////////////////////////////// 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 imscc1_converter::description |
( |
| ) |
|
|
static |
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 from base_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 imscc1_converter::detect_format |
( |
|
$tempdir | ) |
|
|
static |
Detects the Common Cartridge 1.0 format of the backup directory.
- Parameters
-
string | $tempdir | the name of the backup directory |
- Return values
-
null|string | backup::FORMAT_IMSCC1 if the Common Cartridge 1.0 is detected, null otherwise |
Reimplemented from base_converter.
◆ execute()
imscc1_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 base_converter::is_available |
( |
| ) |
|
|
staticinherited |
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 in imscc1_export_converter, and moodle1_export_converter.
◆ log()
imscc1_converter::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.
Reimplemented from base_converter.
◆ 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/lib.php