Пример #1
0
 /**
  * @param SqlDumperContext $context
  */
 public function __construct(SqlDumperContext $context)
 {
     $this->context = $context;
     $this->connectionHandler = $context->getConnectionHandler();
     $this->dataConverter = $context->getDataConverter();
     $this->dumpOutput = $context->getDumpOutput();
     $this->logger = $context->getLogger();
     $this->dataLoader = new DataLoader($this->connectionHandler);
 }
Пример #2
0
 /**
  * @param SqlDumperContext $context
  * @param Table[]          $tables
  */
 private function dumpTables(SqlDumperContext $context, array $tables)
 {
     $progress = $context->getProgressBarHelper()->createProgressBar(count($tables));
     $contentsDumper = new TableContentsDumper($context);
     foreach ($tables as $table) {
         $contentsDumper->dumpTable($table, $context->getConfig()->getTableConfig($table->getName()));
         $progress->advance();
     }
     $progress->finish();
     $context->getLogger()->info('Dump finished');
 }