original_string: public function begin_table_import($tablename, $schemaHash) {
          if ($this->transactionmode == 'pertable') {
              $this->transaction = $this->mdb->start_delegated_transaction();
          }
          if (!$table = $this->schema->getTable($tablename)) {
              throw new dbtransfer_exception('unknowntableexception', $tablename);
          }
          if ($schemaHash != $table->getHash()) {
              throw new dbtransfer_exception('differenttableexception', $tablename);
          }
          // this should not happen, unless someone drops tables after import started
          if (!$this->manager->table_exists($table)) {
              throw new ddl_table_missing_exception($tablename);
          }
          $this->mdb->delete_records($tablename);
      }
code: public function begin_table_import($tablename, $schemaHash) {
          if ($this->transactionmode == 'pertable') {
              $this->transaction = $this->mdb->start_delegated_transaction();
          }
          if (!$table = $this->schema->getTable($tablename)) {
              throw new dbtransfer_exception('unknowntableexception', $tablename);
          }
          if ($schemaHash != $table->getHash()) {
              throw new dbtransfer_exception('differenttableexception', $tablename);
          }
          // this should not happen, unless someone drops tables after import started
          if (!$this->manager->table_exists($table)) {
              throw new ddl_table_missing_exception($tablename);
          }
          $this->mdb->delete_records($tablename);
      }
code_tokens: public function begin_table_import ( $ tablename , $ schemaHash ) { if ( $ this -> transactionmode == 'pertable' ) { $ this -> transaction = $ this -> mdb -> start_delegated_transaction ( ) ; } if ( ! $ table = $ this -> schema -> getTable ( $ tablename ) ) { throw new dbtransfer_exception ( 'unknowntableexception' , $ tablename ) ; } if ( $ schemaHash != $ table -> getHash ( ) ) { throw new dbtransfer_exception ( 'differenttableexception' , $ tablename ) ; } // this should not happen, unless someone drops tables after import started if ( ! $ this -> manager -> table_exists ( $ table ) ) { throw new ddl_table_missing_exception ( $ tablename ) ; } $ this -> mdb -> delete_records ( $ tablename ) ; }
docstring: Callback function. Should be called only once per table import operation,
  before any table changes are made. It will delete all table data.
  
  @throws dbtransfer_exception an unknown table import is attempted
  @throws ddl_table_missing_exception if the table is missing
  
  @param string $tablename - the name of the table that will be imported
  @param string $schemaHash - the hash of the xmldb_table schema of the table
  @return void
docstring_tokens: Callback function . Should be called only once per table import operation before any table changes are made . It will delete all table data .