public function add( Route $route ){
		$routeId	= $route->getId();
		if( array_key_exists( $routeId, $this->routes ) ){
			throw new \DomainException( sprintf(
				'A route for pattern and method is already registered: %2$s %1$s',
				$route->getPattern(),
				$route->getMethod()
			) );
		}
		$this->routes[$routeId]	= $route;
		return $routeId;
	}
public function add( Route $route ){
		$routeId	= $route->getId();
		if( array_key_exists( $routeId, $this->routes ) ){
			throw new \DomainException( sprintf(
				'A route for pattern and method is already registered: %2$s %1$s',
				$route->getPattern(),
				$route->getMethod()
			) );
		}
		$this->routes[$routeId]	= $route;
		return $routeId;
	}
public function add ( Route $ route ) { $ routeId = $ route -> getId ( ) ; if ( array_key_exists ( $ routeId , $ this -> routes ) ) { throw new \ DomainException ( sprintf ( 'A route for pattern and method is already registered: %2$s %1$s' , $ route -> getPattern ( ) , $ route -> getMethod ( ) ) ) ; } $ this -> routes [ $ routeId ] = $ route ; return $ routeId ; }
Adds route to route registry by route object.
@access		public
@param		Route		$route		Route object
@return		string		ID of added route
@throws		DomainException			if route is already registered by route ID
Adds route to route registry by route object .