public function add($path, $controller, $name = null)
    {
        $route = new Route($path);
        $route->setDefault('_controller', $controller);
        $this->addRoute($route, $name);

        return $route;
    }
public function add($path, $controller, $name = null)
    {
        $route = new Route($path);
        $route->setDefault('_controller', $controller);
        $this->addRoute($route, $name);

        return $route;
    }
public function add ( $ path , $ controller , $ name = null ) { $ route = new Route ( $ path ) ; $ route -> setDefault ( '_controller' , $ controller ) ; $ this -> addRoute ( $ route , $ name ) ; return $ route ; }
Adds a route and returns it for future modification.

@param string      $path       The route path
@param string      $controller The route's controller
@param string|null $name       The name to give this route

@return Route
Adds a route and returns it for future modification .