public static function add(Route $route)
    {
        exception_if(self::checkDuplicated($route), RouteDuplicatedException::class, $route);

        // Create new route for url ended with '/'
        $routeWithoutSlash = $route;
        $routeWithSlash = $route->getWithSlash();

        self::$register[$routeWithoutSlash->getName()] = $routeWithoutSlash;
        self::$register[$routeWithSlash->getName()] = $routeWithSlash;
    }
public static function add(Route $route)
    {
        exception_if(self::checkDuplicated($route), RouteDuplicatedException::class, $route);

        // Create new route for url ended with '/'
        $routeWithoutSlash = $route;
        $routeWithSlash = $route->getWithSlash();

        self::$register[$routeWithoutSlash->getName()] = $routeWithoutSlash;
        self::$register[$routeWithSlash->getName()] = $routeWithSlash;
    }
public static function add ( Route $ route ) { exception_if ( self :: checkDuplicated ( $ route ) , RouteDuplicatedException :: class , $ route ) ; // Create new route for url ended with '/' $ routeWithoutSlash = $ route ; $ routeWithSlash = $ route -> getWithSlash ( ) ; self :: $ register [ $ routeWithoutSlash -> getName ( ) ] = $ routeWithoutSlash ; self :: $ register [ $ routeWithSlash -> getName ( ) ] = $ routeWithSlash ; }
Add new route to register.

@param Route $route

@return null
Add new route to register .