Core/Routing/Router.php
public function addRoute(RouteInterface $route)
    {
        foreach ($this->middlewares as $m) {
            $route->addMiddleware($m);
        }
        $this->routes[] = $route;
        return $this;
    }
public function addRoute(RouteInterface $route)
    {
        foreach ($this->middlewares as $m) {
            $route->addMiddleware($m);
        }
        $this->routes[] = $route;
        return $this;
    }
public function addRoute ( RouteInterface $ route ) { foreach ( $ this -> middlewares as $ m ) { $ route -> addMiddleware ( $ m ) ; } $ this -> routes [ ] = $ route ; return $ this ; }
Add custom route object to routes array.

@param RouteInterface $route
@return self
Add custom route object to routes array .