CraftCli\Command\DbPullCommand::makeSshCommand PHP Method

makeSshCommand() protected method

Make an SSH command object
protected makeSshCommand ( string $command ) : SshCommand
$command string Command to execute over SSH
return CraftCli\Support\SshCommand
    protected function makeSshCommand($command)
    {
        $sshCommand = new SshCommand($this->sshCredentials['host'], $command);
        if (!empty($this->sshCredentials['user'])) {
            $sshCommand->user = $this->sshCredentials['user'];
        }
        if (!empty($this->sshCredentials['port'])) {
            $sshCommand->port = $this->sshCredentials['port'];
        }
        if (!empty($this->sshCredentials['identityFile'])) {
            $sshCommand->identityFile = $this->sshCredentials['identityFile'];
        }
        return $sshCommand;
    }