public static function forFunction($function, array $functionParameters = []) : RouteMatch
    {
        try {
            $controller = new \ReflectionFunction($function);
        } catch (\ReflectionException $e) {
            throw RoutingException::invalidControllerFunction($e, $function);
        }

        return new self($controller, [], $functionParameters);
    }