MySql
extends DbDumper
in package
Table of Contents
- $allDatabasesWasSetAsExtraOption : bool
- $compressor : object
- $createTables : bool
- $dbName : string
- $dbNameWasSetAsExtraOption : bool
- $defaultCharacterSet : string
- $dumpBinaryPath : string
- $excludeTables : array<string|int, mixed>
- $extraOptions : array<string|int, mixed>
- $host : string
- $includeTables : array<string|int, mixed>
- $password : string
- $port : int
- $setGtidPurged : string
- $skipComments : bool
- $socket : string
- $timeout : int
- $useExtendedInserts : bool
- $userName : string
- $useSingleTransaction : bool
- __construct() : mixed
- addExtraOption() : $this
- create() : mixed
- doNotCreateTables() : $this
- dontSkipComments() : $this
- dontUseExtendedInserts() : $this
- dontUseSingleTransaction() : $this
- dumpToFile() : mixed
- Dump the contents of the database to the given file.
- enableCompression() : $this
- excludeTables() : $this
- getCompressorExtension() : string
- getContentsOfCredentialsFile() : string
- getDbName() : string
- getDumpCommand() : string
- Get the command that should be performed to dump the database.
- getHost() : string
- includeTables() : $this
- setDbName() : $this
- setDefaultCharacterSet() : $this
- setDumpBinaryPath() : mixed
- setGtidPurged() : $this
- setHost() : $this
- setPassword() : $this
- setPort() : $this
- setSocket() : $this
- setTimeout() : $this
- setUserName() : $this
- skipComments() : $this
- useCompressor() : mixed
- useExtendedInserts() : $this
- useSingleTransaction() : $this
- checkIfDumpWasSuccessFul() : mixed
- determineQuote() : string
- echoToFile() : string
- guardAgainstIncompleteCredentials() : mixed
Properties
$allDatabasesWasSetAsExtraOption
protected
bool
$allDatabasesWasSetAsExtraOption
= false
$compressor
protected
object
$compressor
= null
$createTables
protected
bool
$createTables
= true
$dbName
protected
string
$dbName
$dbNameWasSetAsExtraOption
protected
bool
$dbNameWasSetAsExtraOption
= false
$defaultCharacterSet
protected
string
$defaultCharacterSet
= ''
$dumpBinaryPath
protected
string
$dumpBinaryPath
= ''
$excludeTables
protected
array<string|int, mixed>
$excludeTables
= []
$extraOptions
protected
array<string|int, mixed>
$extraOptions
= []
$host
protected
string
$host
= 'localhost'
$includeTables
protected
array<string|int, mixed>
$includeTables
= []
$password
protected
string
$password
$port
protected
int
$port
= 5432
$setGtidPurged
protected
string
$setGtidPurged
= 'AUTO'
$skipComments
protected
bool
$skipComments
= true
$socket
protected
string
$socket
= ''
$timeout
protected
int
$timeout
= 0
$useExtendedInserts
protected
bool
$useExtendedInserts
= true
$userName
protected
string
$userName
$useSingleTransaction
protected
bool
$useSingleTransaction
= false
Methods
__construct()
public
__construct() : mixed
Return values
mixed —addExtraOption()
public
addExtraOption(string $extraOption) : $this
Parameters
- $extraOption : string
Return values
$this —create()
public
static create() : mixed
Return values
mixed —doNotCreateTables()
public
doNotCreateTables() : $this
Return values
$this —dontSkipComments()
public
dontSkipComments() : $this
Return values
$this —dontUseExtendedInserts()
public
dontUseExtendedInserts() : $this
Return values
$this —dontUseSingleTransaction()
public
dontUseSingleTransaction() : $this
Return values
$this —dumpToFile()
Dump the contents of the database to the given file.
public
dumpToFile(string $dumpFile) : mixed
Parameters
- $dumpFile : string
Tags
Return values
mixed —enableCompression()
public
enableCompression() : $this
Tags
Return values
$this —excludeTables()
public
excludeTables(string|array<string|int, mixed> $excludeTables) : $this
Parameters
- $excludeTables : string|array<string|int, mixed>
Tags
Return values
$this —getCompressorExtension()
public
getCompressorExtension() : string
Return values
string —getContentsOfCredentialsFile()
public
getContentsOfCredentialsFile() : string
Return values
string —getDbName()
public
getDbName() : string
Return values
string —getDumpCommand()
Get the command that should be performed to dump the database.
public
getDumpCommand(string $dumpFile, string $temporaryCredentialsFile) : string
Parameters
- $dumpFile : string
- $temporaryCredentialsFile : string
Return values
string —getHost()
public
getHost() : string
Return values
string —includeTables()
public
includeTables(string|array<string|int, mixed> $includeTables) : $this
Parameters
- $includeTables : string|array<string|int, mixed>
Tags
Return values
$this —setDbName()
public
setDbName(string $dbName) : $this
Parameters
- $dbName : string
Return values
$this —setDefaultCharacterSet()
public
setDefaultCharacterSet(string $characterSet) : $this
Parameters
- $characterSet : string
Return values
$this —setDumpBinaryPath()
public
setDumpBinaryPath(string $dumpBinaryPath) : mixed
Parameters
- $dumpBinaryPath : string
Return values
mixed —setGtidPurged()
public
setGtidPurged(string $setGtidPurged) : $this
Parameters
- $setGtidPurged : string
Return values
$this —setHost()
public
setHost(string $host) : $this
Parameters
- $host : string
Return values
$this —setPassword()
public
setPassword(string $password) : $this
Parameters
- $password : string
Return values
$this —setPort()
public
setPort(int $port) : $this
Parameters
- $port : int
Return values
$this —setSocket()
public
setSocket(string $socket) : $this
Parameters
- $socket : string
Return values
$this —setTimeout()
public
setTimeout(int $timeout) : $this
Parameters
- $timeout : int
Return values
$this —setUserName()
public
setUserName(string $userName) : $this
Parameters
- $userName : string
Return values
$this —skipComments()
public
skipComments() : $this
Return values
$this —useCompressor()
public
useCompressor(Compressor $compressor) : mixed
Parameters
- $compressor : Compressor
Return values
mixed —useExtendedInserts()
public
useExtendedInserts() : $this
Return values
$this —useSingleTransaction()
public
useSingleTransaction() : $this
Return values
$this —checkIfDumpWasSuccessFul()
protected
checkIfDumpWasSuccessFul(Process $process, string $outputFile) : mixed
Parameters
- $process : Process
- $outputFile : string
Return values
mixed —determineQuote()
protected
determineQuote() : string
Return values
string —echoToFile()
protected
echoToFile(string $command, string $dumpFile) : string
Parameters
- $command : string
- $dumpFile : string
Return values
string —guardAgainstIncompleteCredentials()
protected
guardAgainstIncompleteCredentials() : mixed