private function decomposeUrl($path_or_url)
    {
        $result = array();

        if (filter_var($path_or_url, FILTER_VALIDATE_URL)) {
            $url_parts = parse_url($path_or_url);
            $result['prefix'] = $url_parts['scheme'] . "://" . $url_parts['host'];
            $result['path'] = $url_parts['path'];
            $result['suffix'] = "";
            $result['suffix'] .= (empty($url_parts['query'])) ? "" : "?" . $url_parts['query'];
            $result['suffix'] .= (empty($url_parts['fragment'])) ? "" : "#" . $url_parts['fragment'];
        } else {
            $result['prefix'] = "";
            $result['path'] = $path_or_url;
            $result['suffix'] = "";
        }

        return $result;
    }