Base class for database export operations.  
 More...
Base class for database export operations. 
This class defines basic callbacks for export operations and implements the 
- See also
 - export_database and @export_table methods generic export processing. In general, subclasses will override callback methods to provide specific output and (optionally) 
 
- 
export_database to add functionality. Between a single pair of calls to 
 
- 
begin_database_export and 
 
- 
finish_database_export, multiple non-overlapping pairs of calls may be made to 
 
- 
begin_table_export and 
 
- 
finish_database_export for different tables. Between one pair of calls to 
 
- 
begin_table_export and 
 
- 
finish_database_export multiple calls may be made to 
 
- 
export_table_data for the same table. 
 
 
◆ __construct()
      
        
          | database_exporter::__construct  | 
          ( | 
          moodle_database  | 
          $mdb,  | 
        
        
           | 
           | 
            | 
          $check_schema = true  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Object constructor. 
- Parameters
 - 
  
  
 
- 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). 
 
 
 
◆ begin_database_export()
  
  
      
        
          | database_exporter::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).
- Parameters
 - 
  
    | 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.  | 
  
   
- Return values
 - 
  
  
 
Reimplemented in xml_database_exporter, and database_mover.
 
 
◆ begin_table_export()
  
  
      
        
          | 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).
- Parameters
 - 
  
  
 
- Return values
 - 
  
  
 
Reimplemented in xml_database_exporter, and database_mover.
 
 
◆ export_database()
      
        
          | database_exporter::export_database  | 
          ( | 
            | 
          $description = null | ) | 
           | 
        
      
 
 
◆ export_table_data()
  
  
      
        
          | database_exporter::export_table_data  | 
          ( | 
          xmldb_table  | 
          $table,  | 
         
        
           | 
           | 
            | 
          $data  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
abstract   | 
  
 
Callback function. 
Should be called only once per record export operation, only between 
- See also
 - begin_table_export and 
 
- 
finish_table_export calls. It will insert table data. Subclasses should export basic record information (data values).
 
- Parameters
 - 
  
    | xmldb_table | $table | - XMLDB object of the table from which data was retrieved  | 
    | object | $data | - data object (fields and values from record)  | 
  
   
- Return values
 - 
  
  
 
Reimplemented in xml_database_exporter, and database_mover.
 
 
◆ finish_database_export()
  
  
      
        
          | database_exporter::finish_database_export  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
abstract   | 
  
 
 
◆ finish_table_export()
  
  
      
        
          | 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.
- Parameters
 - 
  
  
 
Reimplemented in xml_database_exporter, and database_mover.
 
 
◆ $check_schema
  
  
      
        
          | bool 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. 
- See also
 - export_database). 
 
 
 
◆ $manager
◆ $mdb
◆ $schema
Source database schema in XMLDB format (a. 
- See also
 - xmldb_structure object). 
 
 
 
The documentation for this class was generated from the following file: