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

Public Member Functions

 __construct (moodle_database $mdb_source, moodle_database $mdb_target, $check_schema=true, progress_trace $feeback=null)
 set_transaction_mode ($mode)
 begin_database_export ($version, $release, $timestamp, $description)
 begin_table_export (xmldb_table $table)
 export_table_data (xmldb_table $table, $data)
 finish_table_export (xmldb_table $table)
 finish_database_export ()

Protected Attributes

 $importer
 $feeback

Detailed Description

Definition at line 30 of file database_mover.php.


Constructor & Destructor Documentation

__construct ( moodle_database mdb_source,
moodle_database mdb_target,
check_schema = true,
progress_trace feeback = null 
)

Object constructor.

Parameters:
moodle_database$mdbConnection to the source database (a
See also:
moodle_database object).
Parameters:
moodle_database$mdb_targetConnection to the target database (a
See also:
moodle_database object).
Parameters:
boolean$check_schema- whether or not to check that XML database schema matches the RDBMS database schema before exporting (used by
See also:
export_database).

Definition at line 46 of file database_mover.php.


Member Function Documentation

begin_database_export ( version,
release,
timestamp,
description 
)

Callback function. Calls importer's begin_database_import callback method.

Parameters:
float$versionthe version of the system which generating the data
string$timestampthe timestamp of the data (in ISO 8601) format.
string$descriptiona user description of the data.
Returns:
void

Reimplemented from database_exporter.

Definition at line 77 of file database_mover.php.

Callback function. Calls importer's begin_table_import callback method.

Parameters:
xmldb_table$table- XMLDB object for the exported table
Returns:
void

Reimplemented from database_exporter.

Definition at line 88 of file database_mover.php.

Here is the call graph for this function:

export_table_data ( xmldb_table table,
data 
)

Callback function. Calls importer's import_table_data callback method.

Parameters:
xmldb_table$table- XMLDB object of the table from which data was retrieved
object$data- data object (fields and values from record)
Returns:
void

Reimplemented from database_exporter.

Definition at line 101 of file database_mover.php.

Here is the call graph for this function:

Callback function. Calls importer's finish_database_import callback method.

Returns:
void

Reimplemented from database_exporter.

Definition at line 119 of file database_mover.php.

Callback function. Calls importer's finish_table_import callback method.

Parameters:
xmldb_table$table- XMLDB object for the exported table
Returns:
void

Reimplemented from database_exporter.

Definition at line 110 of file database_mover.php.

Here is the call graph for this function:

set_transaction_mode ( mode)

How to use transactions during the transfer.

Parameters:
string$mode'pertable', 'allinone' or 'none'.

Definition at line 65 of file database_mover.php.


Field Documentation

$feeback [protected]

Definition at line 33 of file database_mover.php.

$importer [protected]

Importer object used to transfer data.

Definition at line 32 of file database_mover.php.


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