protected function getRouteFromAnnotation(Route $route): RouterRoute
    {
        $routerRoute = new RouterRoute();

        $routerRoute
            ->setPath($route->getPath())
            ->setRegex($route->getRegex())
            ->setParams($route->getParams())
            ->setSegments($route->getSegments())
            ->setRequestMethods($route->getRequestMethods())
            ->setSecure($route->isSecure())
            ->setDynamic($route->isDynamic())
            ->setId($route->getId())
            ->setName($route->getName())
            ->setClass($route->getClass())
            ->setProperty($route->getProperty())
            ->setMethod($route->getMethod())
            ->setStatic($route->isStatic())
            ->setFunction($route->getFunction())
            ->setMatches($route->getMatches())
            ->setDependencies($route->getDependencies())
            ->setMiddleware($route->getMiddleware())
            ->setArguments($route->getArguments());

        return $routerRoute;
    }