/** * @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); }
/** * 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(''); }