public function registerNamedRoute(Route $routeObj)
    {
        $name = $routeObj->getName();
        if ($name && isset($this->namedRoutes[$name])) {
            if ($routeObj !== $this->namedRoutes[$name]) {
                throw new Exception("Can not redeclare route '{$name}'");
            }
        } else {
            $this->namedRoutes[$name] = $routeObj;
        }
    }
public function registerNamedRoute(Route $routeObj)
    {
        $name = $routeObj->getName();
        if ($name && isset($this->namedRoutes[$name])) {
            if ($routeObj !== $this->namedRoutes[$name]) {
                throw new Exception("Can not redeclare route '{$name}'");
            }
        } else {
            $this->namedRoutes[$name] = $routeObj;
        }
    }
public function registerNamedRoute ( Route $ routeObj ) { $ name = $ routeObj -> getName ( ) ; if ( $ name && isset ( $ this -> namedRoutes [ $ name ] ) ) { if ( $ routeObj !== $ this -> namedRoutes [ $ name ] ) { throw new Exception ( "Can not redeclare route '{$name}'" ) ; } } else { $ this -> namedRoutes [ $ name ] = $ routeObj ; } }
Registers a route with a name
@param Route $routeObj
@throws Exception
Registers a route with a name