Spatie\DbDumper\Databases\PostgreSql::getDumpCommand PHP Метод

getDumpCommand() публичный Метод

Get the command that should be performed to dump the database.
public getDumpCommand ( string $dumpFile ) : string
$dumpFile string
Результат string
    public function getDumpCommand(string $dumpFile) : string
    {
        $command = ["'{$this->dumpBinaryPath}pg_dump'", "-U {$this->userName}", '-h ' . ($this->socket === '' ? $this->host : $this->socket), "-p {$this->port}", "--file=\"{$dumpFile}\""];
        if ($this->useInserts) {
            $command[] = '--inserts';
        }
        foreach ($this->extraOptions as $extraOption) {
            $command[] = $extraOption;
        }
        if (!empty($this->includeTables)) {
            $command[] = '-t ' . implode(' -t ', $this->includeTables);
        }
        if (!empty($this->excludeTables)) {
            $command[] = '-T ' . implode(' -T ', $this->excludeTables);
        }
        return implode(' ', $command);
    }