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

Public Member Functions | |
| __construct (moodle_database $mdb, $check_schema=true) | |
| begin_database_export ($version, $release, $timestamp, $description) | |
| begin_table_export (xmldb_table $table) | |
| finish_table_export (xmldb_table $table) | |
| finish_database_export () | |
| export_table_data (xmldb_table $table, $data) | |
| export_database ($description=null) | |
Protected Attributes | |
| $mdb | |
| $manager | |
| $schema | |
| $check_schema | |
Base class for database export operations. This class defines basic callbacks for export operations and implements the
Definition at line 43 of file database_exporter.php.
| __construct | ( | moodle_database $ | mdb, |
| $ | check_schema = true |
||
| ) |
Object constructor.
| moodle_database | $mdb | Connection to the source database (a |
| boolean | $check_schema | - whether or not to check that XML database schema matches the RDBMS database schema before exporting (used by |
Definition at line 66 of file database_exporter.php.

| begin_database_export | ( | $ | version, |
| $ | release, | ||
| $ | timestamp, | ||
| $ | description | ||
| ) | [abstract] |
Callback function. Should be called only once database per export operation, before any other export operations. Subclasses should export basic database information (version and timestamp).
| float | $version | the version of the system which generating the data |
| string | $release | moodle release info |
| string | $timestamp | the timestamp of the data (in ISO 8601) format. |
| string | $description | a user description of the data. |
Reimplemented in database_mover, and xml_database_exporter.

| begin_table_export | ( | xmldb_table $ | table | ) | [abstract] |
Callback function. Should be called only once per table export operation, before any other table export operations. Subclasses should export basic database information (name and schema's hash).
| xmldb_table | $table | - XMLDB object for the exported table |
Reimplemented in database_mover, and xml_database_exporter.

| export_database | ( | $ | description = null | ) |
Generic method to export the database. It checks the schema (if
| dbtransfer_exception | if any checking (e.g. database schema) fails |
| string | $description | a user description of the data. |
Reimplemented in file_xml_database_exporter, and string_xml_database_exporter.
Definition at line 131 of file database_exporter.php.

| export_table_data | ( | xmldb_table $ | table, |
| $ | data | ||
| ) | [abstract] |
Callback function. Should be called only once per record export operation, only between
| xmldb_table | $table | - XMLDB object of the table from which data was retrieved |
| object | $data | - data object (fields and values from record) |
Reimplemented in database_mover, and xml_database_exporter.

| finish_database_export | ( | ) | [abstract] |
Callback function. Should be called only once database per export operation, after all database export operations.
Reimplemented in database_mover, and xml_database_exporter.

| finish_table_export | ( | xmldb_table $ | table | ) | [abstract] |
Callback function. Should be called only once per table export operation, after all other table export operations.
| xmldb_table | $table | - XMLDB object for the exported table |
Reimplemented in database_mover, and xml_database_exporter.

$check_schema [protected] |
Boolean flag - whether or not to check that XML database schema matches the RDBMS database schema before exporting (used by
Definition at line 55 of file database_exporter.php.
$manager [protected] |
Database manager of the source database (a
Definition at line 47 of file database_exporter.php.
$mdb [protected] |
Connection to the source database (a
Definition at line 45 of file database_exporter.php.
$schema [protected] |
Source database schema in XMLDB format (a
Definition at line 49 of file database_exporter.php.