protected function getMysqlArguments($credentials, $appendDatabase = true)
    {
        $arguments = [];
        $database = '';
        foreach ($this->databaseArguments as $key) {
            if (empty($credentials[$key])) {
                continue;
            }
            $value = escapeshellarg($credentials[$key]);
            if ($key === 'database') {
                $database = $value;
            } else {
                $arguments[$key] = '--' . $key . '=' . $value;
            }
        }
        if ($appendDatabase === true) {
            return implode(' ', $arguments) . ' ' . $database;
        } else {
            return implode(' ', $arguments);
        }
    }
protected function getMysqlArguments($credentials, $appendDatabase = true)
    {
        $arguments = [];
        $database = '';
        foreach ($this->databaseArguments as $key) {
            if (empty($credentials[$key])) {
                continue;
            }
            $value = escapeshellarg($credentials[$key]);
            if ($key === 'database') {
                $database = $value;
            } else {
                $arguments[$key] = '--' . $key . '=' . $value;
            }
        }
        if ($appendDatabase === true) {
            return implode(' ', $arguments) . ' ' . $database;
        } else {
            return implode(' ', $arguments);
        }
    }
protected function getMysqlArguments ( $ credentials , $ appendDatabase = true ) { $ arguments = [ ] ; $ database = '' ; foreach ( $ this -> databaseArguments as $ key ) { if ( empty ( $ credentials [ $ key ] ) ) { continue ; } $ value = escapeshellarg ( $ credentials [ $ key ] ) ; if ( $ key === 'database' ) { $ database = $ value ; } else { $ arguments [ $ key ] = '--' . $ key . '=' . $ value ; } } if ( $ appendDatabase === true ) { return implode ( ' ' , $ arguments ) . ' ' . $ database ; } else { return implode ( ' ' , $ arguments ) ; } }
Returns MySQL Arguments.

@param array $credentials
@param bool $appendDatabase

@return string
Returns MySQL Arguments .