Moodle  2.2.1
http://www.collinsharper.com
backup_general_helper Class Reference
Inheritance diagram for backup_general_helper:
Collaboration diagram for backup_general_helper:

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)

Detailed Description

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.


Member Function Documentation

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

static detect_backup_format ( tempdir) [static]

Detects the format of the given unpacked backup directory

Parameters:
string$tempdirthe name of the backup directory
Returns:
string one of backup::FORMAT_xxx constants

Definition at line 238 of file backup_general_helper.class.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations