|
Moodle
2.2.1
http://www.collinsharper.com
|


Static Public Member Functions | |
| static | array_checksum_recursive ($arr) |
| static | get_blocks_from_path ($path) |
| static | get_backup_information ($tempdir) |
| static | backup_is_samesite ($info) |
| static | detect_backup_format ($tempdir) |
Non instantiable helper class providing general helper methods for backup/restore
This class contains various general helper static methods available for backup/restore
TODO: Finish phpdocs
Definition at line 32 of file backup_general_helper.class.php.
| static array_checksum_recursive | ( | $ | arr | ) | [static] |
Calculate one checksum for any array/object. Works recursively
Definition at line 37 of file backup_general_helper.class.php.

| static backup_is_samesite | ( | $ | info | ) | [static] |
Given the information fetched from moodle_backup.xml file decide if we are restoring in the same site the backup was generated or no. Behavior of various parts of restore are dependent of this.
Backups created natively in 2.0 and later declare the hashed site identifier. Backups created by conversion from a 1.9 backup do not declare such identifier, so there is a fallback to wwwroot comparison. See MDL-16614.
Definition at line 222 of file backup_general_helper.class.php.


| static detect_backup_format | ( | $ | tempdir | ) | [static] |
Detects the format of the given unpacked backup directory
| string | $tempdir | the name of the backup directory |
Definition at line 238 of file backup_general_helper.class.php.


| static get_backup_information | ( | $ | tempdir | ) | [static] |
Load and format all the needed information from moodle_backup.xml
This function loads and process all the moodle_backup.xml information, composing a big information structure that will be the used by the plan builder in order to generate the appropiate tasks / steps / settings
Definition at line 112 of file backup_general_helper.class.php.

| static get_blocks_from_path | ( | $ | path | ) | [static] |
Load all the blocks information needed for a given path within moodle2 backup
This function, given one full path (course, activities/xxxx) will look for all the blocks existing in the backup file, returning one array used to build the proper restore plan by the
Definition at line 66 of file backup_general_helper.class.php.

