public function addRoute(Route $route, $name = null)
    {
        if (null === $name) {
            // used as a flag to know which routes will need a name later
            $name = '_unnamed_route_'.spl_object_hash($route);
        }

        $this->routes[$name] = $route;

        return $this;
    }
public function addRoute(Route $route, $name = null)
    {
        if (null === $name) {
            // used as a flag to know which routes will need a name later
            $name = '_unnamed_route_'.spl_object_hash($route);
        }

        $this->routes[$name] = $route;

        return $this;
    }
public function addRoute ( Route $ route , $ name = null ) { if ( null === $ name ) { // used as a flag to know which routes will need a name later $ name = '_unnamed_route_' . spl_object_hash ( $ route ) ; } $ this -> routes [ $ name ] = $ route ; return $ this ; }
Adds a Route object to the builder.

@param Route       $route
@param string|null $name

@return $this
Adds a Route object to the builder .