BossBey File Manager
PHP:
8.2.30
OS:
Linux
User:
imagivibe
Root
/
home
/
imagivibe
/
public_html
/
app.imagivibe.com
/
vendor
/
spatie
/
db-dumper
/
src
/
Databases
📤 Upload
📝 New File
📁 New Folder
Close
Editing: MariaDb.php
<?php namespace Spatie\DbDumper\Databases; class MariaDb extends MySql { protected bool $withSandboxMode = true; public function getDumpCommand(string $dumpFile, string $temporaryCredentialsFile): string { $quote = $this->determineQuote(); $command = [ "{$quote}{$this->dumpBinaryPath}mariadb-dump{$quote}", "--defaults-extra-file=\"{$temporaryCredentialsFile}\"", ]; $finalDumpCommand = $this->getCommonDumpCommand($command) . $this->determineSandboxMode(); return $this->echoToFile($finalDumpCommand, $dumpFile); } public function withoutSandboxMode(): self { $this->withSandboxMode = false; return $this; } public function determineSandboxMode(): string { // allow mariadb/MySQL compatability: https://mariadb.org/mariadb-dump-file-compatibility-change/ return $this->withSandboxMode ? '' : '|tail +2'; } }
Save
Cancel