Example #1
0
 /**
  * @brief saves database scheme to xml file
  * @param string $file name of file
  * @param int $mode
  * @return bool
  *
  * TODO: write more documentation
  */
 public static function getDbStructure($file, $mode = MDB2_SCHEMA_DUMP_STRUCTURE)
 {
     self::connectScheme();
     // write the scheme
     $definition = self::$schema->getDefinitionFromDatabase();
     $dump_options = array('output_mode' => 'file', 'output' => $file, 'end_of_line' => "\n");
     self::$schema->dumpDatabase($definition, $dump_options, $mode);
     return true;
 }