protected function _appendRedirectQueryString($url, $redirectQueryString)
    {
        if (!$redirectQueryString) {
            return $url;
        }

        if (is_array($url)) {
            $url['?'][static::QUERY_STRING_REDIRECT] = $redirectQueryString;
        } else {
            $char = strpos($url, '?') === false ? '?' : '&';
            $url .= $char . static::QUERY_STRING_REDIRECT . '=' . urlencode($redirectQueryString);
        }

        return $url;
    }