Library/Think/Http/Router.class.php
/**
     * Add a route object to the router
     * @param \Think\Http\Route $route The Slim Route
     */
Add a route object to the router
@param \Think\Http\Route $route The Slim Route
Add a route object to the router @param \ Think \ Http \ Route $route The Slim Route
public function map(\Think\Http\Route $route) {
        list($groupPattern, $groupMiddleware) = $this->processGroups();
        $route->setPattern($groupPattern . $route->getPattern());
        $route->setDomain($this->routeDomain);
        $route->setModule($this->module);
        $this->routes[] = $route;
        foreach ($groupMiddleware as $middleware) {
            $route->setMiddleware($middleware);
        }
    }
public function map ( \ Think \ Http \ Route $ route ) { list ( $ groupPattern , $ groupMiddleware ) = $ this -> processGroups ( ) ; $ route -> setPattern ( $ groupPattern . $ route -> getPattern ( ) ) ; $ route -> setDomain ( $ this -> routeDomain ) ; $ route -> setModule ( $ this -> module ) ; $ this -> routes [ ] = $ route ; foreach ( $ groupMiddleware as $ middleware ) { $ route -> setMiddleware ( $ middleware ) ; } }
Add a route object to the router
 @param \Think\Http\Route $route The Slim Route
Add a route object to the router @param \ Think \ Http \ Route $route The Slim Route
// 新增域名绑定机制 // 兼容TP分组机制