protected function urlToParameters($url)
    {
        $urlParameters = [];
        $url = parse_url($url, PHP_URL_PATH);
        $urlParts = explode('/', $url);
        reset($urlParts); // Note, the first entry will always be blank
        $key = next($urlParts);
        while (($value = next($urlParts)) !== false) {
            $urlParameters[$key] = $value;
            $key = $value;
        }
        return $urlParameters;
    }