protected function matchRoute(array $url_array) : array
    {
        // If the routes haven't already been set up, process them.
        if (!isset($this->route_definitions)) {
            $this->loadRoutes();
        }
        $url = '/' . implode('/', $url_array);
        $matches = $this->doRouteMatching($url);
        if (false === $matches) {
            throw new \Exception('Unable to route url ' . $url);
        }
        $route_name = array_shift($matches);
        FW()->log->debug('URL matched route ' . $route_name);
        $route_config = $this->route_definitions[$route_name];
        $return = (isset($route_config['defaults'])) ? $route_config['defaults'] : [];
        foreach ($matches as $name => $match) {
            if (!is_numeric($name)) { // If the key is a number, it is an artifact of the regex process, ignore it
                $return[$name] = $match;
            }
        }
        return $return;
    }