コード例 #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
ファイル: SqlDumper.php プロジェクト: digilist/snakedumper
 /**
  * Put some comments and initial commands at the beginning of the dump.
  *
  * @param SqlDumperContext $context
  */
 private function dumpPreamble(SqlDumperContext $context)
 {
     $dumpOutput = $context->getDumpOutput();
     $commentStart = $context->getConnectionHandler()->getPlatform()->getSqlCommentStartString();
     $dumpOutput->writeln($commentStart . ' ------------------------');
     $dumpOutput->writeln($commentStart . ' SnakeDumper SQL Dump');
     $dumpOutput->writeln($commentStart . ' ------------------------');
     $dumpOutput->writeln('');
     $extras = $context->getConnectionHandler()->getPlatformAdjustment()->getPreembleExtras();
     foreach ($extras as $extra) {
         $dumpOutput->writeln($extra);
     }
     $dumpOutput->writeln('');
 }