private function getImportCommand(array $parameter, $file, $hidePassword = false)
    {
        $username = $parameter['username'];
        $password = $parameter['password'];
        $database = $parameter['database'];
        $host = $parameter['host'];
        $port = $parameter['port'];

        return sprintf(
            'mysql -u%s%s%s%s %s < %s',
            $username,
            isset($password) ? (' -p' . ($hidePassword ? '***' : $password)) : '',
            isset($host) ? (' -h ' . $host) : '',
            isset($port) ? (' -P ' . $port) : '',
            $database,
            $file
        );
    }
private function getImportCommand(array $parameter, $file, $hidePassword = false)
    {
        $username = $parameter['username'];
        $password = $parameter['password'];
        $database = $parameter['database'];
        $host = $parameter['host'];
        $port = $parameter['port'];

        return sprintf(
            'mysql -u%s%s%s%s %s < %s',
            $username,
            isset($password) ? (' -p' . ($hidePassword ? '***' : $password)) : '',
            isset($host) ? (' -h ' . $host) : '',
            isset($port) ? (' -P ' . $port) : '',
            $database,
            $file
        );
    }
private function getImportCommand ( array $ parameter , $ file , $ hidePassword = false ) { $ username = $ parameter [ 'username' ] ; $ password = $ parameter [ 'password' ] ; $ database = $ parameter [ 'database' ] ; $ host = $ parameter [ 'host' ] ; $ port = $ parameter [ 'port' ] ; return sprintf ( 'mysql -u%s%s%s%s %s < %s' , $ username , isset ( $ password ) ? ( ' -p' . ( $ hidePassword ? '***' : $ password ) ) : '' , isset ( $ host ) ? ( ' -h ' . $ host ) : '' , isset ( $ port ) ? ( ' -P ' . $ port ) : '' , $ database , $ file ) ; }
Returns command to import database.

@param array $parameter
@param string $file
@param bool $hidePassword

@return string
Returns command to import database .