Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
XML format exporter class to file storage. More...
Public Member Functions | |
__construct ($filepath, moodle_database $mdb, $check_schema=true) | |
Object constructor. More... | |
begin_database_export ($version, $release, $timestamp, $description) | |
Callback function. More... | |
begin_table_export (xmldb_table $table) | |
Callback function. More... | |
export_database ($description=null) | |
Specific implementation for file exporting the database: it opens output stream, calls superclass. More... | |
export_table_data (xmldb_table $table, $data) | |
Callback function. More... | |
finish_database_export () | |
Callback function. More... | |
finish_table_export (xmldb_table $table) | |
Callback function. More... | |
Protected Member Functions | |
output ($text) | |
Specific output method for the file XML sink. More... | |
Protected Attributes | |
bool | $check_schema |
Boolean flag - whether or not to check that XML database schema matches the RDBMS database schema before exporting (used by. More... | |
resource | $file |
File descriptor for the output file. | |
string | $filepath |
Path to the XML data file. | |
database_manager | $manager |
Database manager of the source database (a. More... | |
moodle_database | $mdb |
Connection to the source database (a. More... | |
xmldb_structure | $schema |
Source database schema in XMLDB format (a. More... | |
XML format exporter class to file storage.
file_xml_database_exporter::__construct | ( | $filepath, | |
moodle_database | $mdb, | ||
$check_schema = true |
|||
) |
Object constructor.
string | $filepath | - path to the XML data file. Use 'php://output' for PHP output stream. |
moodle_database | $mdb | Connection to the source database |
boolean | $check_schema | - whether or not to check that XML database |
|
inherited |
Callback function.
Outputs open XML PI and moodle_database opening tag.
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. |
void |
Reimplemented from database_exporter.
|
inherited |
Callback function.
Outputs table opening tag.
xmldb_table | $table | - XMLDB object for the exported table |
void |
Reimplemented from database_exporter.
file_xml_database_exporter::export_database | ( | $description = null | ) |
Specific implementation for file exporting the database: it opens output stream, calls superclass.
dbtransfer_exception | if any checking (e.g. database schema) fails |
string | $description | a user description of the data. |
Reimplemented from database_exporter.
|
inherited |
Callback function.
Outputs record tag with field subtags and data.
xmldb_table | $table | - XMLDB object of the table from which data was retrieved |
object | $data | - data object (fields and values from record) |
void |
Reimplemented from database_exporter.
|
inherited |
|
inherited |
Callback function.
Outputs table closing tag.
xmldb_table | $table | - XMLDB object for the exported table |
Reimplemented from database_exporter.
|
protected |
Specific output method for the file XML sink.
string | $text |
Reimplemented from xml_database_exporter.
|
protectedinherited |
Boolean flag - whether or not to check that XML database schema matches the RDBMS database schema before exporting (used by.
|
protectedinherited |
Database manager of the source database (a.
|
protectedinherited |
Connection to the source database (a.
|
protectedinherited |
Source database schema in XMLDB format (a.