This PR contains a few refactorings that make the SlimdumpCommand, DumpTask and Dumper classes and method signatures more straightforward:
By creating the MysqlOutputFormatDriver in SlimdumpCommand, we can pass it the necessary information from command line switches directly. No need to pass-through these flags and settings through other classes/methods.
Separate the OutputInterface given to MysqlOutputFormatDriver (for writing out SQL) from the OutputInterface passed to Dumper (where it is used to output progress information)
Use a NullOutput for the progress-related OutputInterface instead of passing a $noProgress boolean through several methods. Saves us a bunch of if-conditionals.
"Extract method" refactorings for some meaningful chunks of code
This PR contains a few refactorings that make the
SlimdumpCommand
,DumpTask
andDumper
classes and method signatures more straightforward:MysqlOutputFormatDriver
inSlimdumpCommand
, we can pass it the necessary information from command line switches directly. No need to pass-through these flags and settings through other classes/methods.OutputInterface
given toMysqlOutputFormatDriver
(for writing out SQL) from theOutputInterface
passed toDumper
(where it is used to output progress information)NullOutput
for the progress-relatedOutputInterface
instead of passing a$noProgress
boolean through several methods. Saves us a bunch ofif
-conditionals.