| 1 | <?php |
||
| 8 | abstract class DbDumper |
||
| 9 | { |
||
| 10 | public static function create() |
||
| 11 | { |
||
| 12 | return new static(); |
||
| 13 | } |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Dump the contents of the database to the given file. |
||
| 17 | * |
||
| 18 | * @param string $dumpFile |
||
| 19 | */ |
||
| 20 | abstract public function dumpToFile($dumpFile); |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @return string |
||
| 24 | */ |
||
| 25 | abstract public function getDbName(); |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @param \Symfony\Component\Process\Process $process |
||
| 29 | * @param string $outputFile |
||
| 30 | * |
||
| 31 | * @return bool |
||
| 32 | * |
||
| 33 | * @throws \Spatie\DbDumper\Exceptions\DumpFailed |
||
| 34 | */ |
||
| 35 | protected function checkIfDumpWasSuccessFul(Process $process, $outputFile) |
||
| 51 | } |
||
| 52 |