public static function addQueryString($path, $queryString = null)
    {
        if(null === $queryString) {
            return $path;
        }

        return sprintf("%s%s%s",
            $path,
            preg_match("#\?#", $path) ? (
                preg_match("#\?$#", $path) ?
                '' : '&'
            ) : '?',
            is_array($queryString) ? http_build_query($queryString) : $queryString
        );
    }