@param bool $forceFetch

@deprecated Not replaced yet
@return RouteInterface
482522
public function makeCollection(bool $forceFetch = false): RouteInterface
    {
        $this->collectionFromPks = true;
        $this->instanceForceFetch = $forceFetch;

        return $this;
    }
374359
public function match(ServerRequestInterface $request)
    {
        $basePathLength = strlen($this->baseUri['path']);

        return RouteCollectionMatcher::matchRouteCollection(
            $this->routeCollection,
            $request,
            $basePathLength,
            []
        ) ?: MatchResult::fromMatchFailure();
    }
1348049
public function addResourceRoute(RouteInterface $resourceRoute
    ): RouteInterface
    {
        $resourceRoute->setIdentifier('route' . $this->routeCounter++);
        // Add route
        $this->routes[$resourceRoute->getIdentifier()] = $resourceRoute;

        return $resourceRoute;
    }
32031
public function getOauthClient($forceNew = false)
    {
        if ( ! isset($this->instances[self::CLIENT_OAUTH]) || $forceNew) {
            $this->instances[self::CLIENT_OAUTH] = MeetupOAuthClient::factory($this->getUpdatedOauthConfig());
        }

        return $this->instances[self::CLIENT_OAUTH];
    }
642624
public function getRoute(ServerRequestInterface $request)
    {
        $url = $request->getUri();
        $route = $this->findRoute($url, $request->getMethod());
        
        if ($route) {
            $route = $this->bind($route, $request, $this->splitUrl($url->getPath()));
        }
        
        return $route;
    }
541105
public function secure(bool $secure = true) : RouteBuilder
    {
        foreach ($this->routes as $route) {
            $route->secure($secure);
        }
        return $this;
    }
940991
protected function getRoute(
        ResultInterface $result,
        /*# string */ $routeKey,
        array $matches
    )/*# : bool */ {
        $method = $result->getMethod();
        if (!isset($this->routes[$routeKey][$method])) {
            $result->setStatus(Status::METHOD_NOT_ALLOWED);
            return false;
        }
        $route = $this->routes[$routeKey][$method];
        $result->setStatus(Status::OK)->setRoute($route)
            ->setParameters(array_replace($route->getDefault(), $matches))
            ->setHandler($route->getHandler(Status::OK));

        $this->debug(Message::get(
            Message::RTE_ROUTE_MATCHED,
            $result->getPath(),
            $route->getPattern()
        ));
        return true;
    }
577621
public function update($version = '', $forceFetching = true) : bool
    {
        $version = $version ?: $this->getVersionAvailable();

        if ($forceFetching) {
            $this->fetch($version);
        }

        $this->preUpdateArtisanCommands();
        $updateStatus = $this->sourceRepository->update($version);
        $this->postUpdateArtisanCommands();

        return $updateStatus;
    }
647156
public function getToken($forceRefresh = false)
    {
        $cacheKey = $this->cacheKey;

        $cached = $this->cache->get($cacheKey);

        if ($forceRefresh || !$cached) {
            $token = $this->getTokenFromServer();

            $this->cache->set($cacheKey, $token['access_token'], $token['expires_in'] - 800);

            return $token['access_token'];
        }

        return $cached;
    }
1322146
public function getToken($forceRefresh = false)
    {
        $cacheKey = $this->getCacheKey();
        $cached = $this->getCache()->fetch($cacheKey);

        if ($forceRefresh || empty($cached)) {
            $token = $this->getTokenFromServer();

            // XXX: T_T... 7200 - 1500
            $this->getCache()->save($cacheKey, $token[$this->tokenJsonKey], $token['expires_in'] - 1500);

            return $token[$this->tokenJsonKey];
        }

        return $cached;
    }
130582
public function dispatch(ServerRequestInterface $request): ResponseInterface
    {
        if ($this->currentRoute === null) {
            return $this->generate404($request);
        }

        foreach ($this->hostParameters as $param => $value) {
            $request = $request->withAttribute($param, $value);
        }

        foreach ($this->currentRoute->getHostParameters() as $param => $value) {
            $request = $request->withAttribute($param, $value);
        }

        foreach ($this->routeParameters as $param => $value) {
            $request = $request->withAttribute($param, $value);
        }

        $this->pushMiddlewaresToApplyInPipe();

        return $this->handle($request);
    }
43293
public static function Initialize($ForceEnable = FALSE, $ForceMethod = FALSE) {
      $AllowCaching = self::ActiveEnabled($ForceEnable); 
      $ActiveCache = Gdn_Cache::ActiveCache();
      
      if ($ForceMethod !== FALSE) $ActiveCache = $ForceMethod;
      $ActiveCacheClass = 'Gdn_'.ucfirst($ActiveCache);
      
      if (!$AllowCaching || !$ActiveCache || !class_exists($ActiveCacheClass)) {
         
         $CacheObject = new Gdn_Dirtycache();
      } else
         $CacheObject = new $ActiveCacheClass();
      
      if (method_exists($CacheObject,'Autorun'))
         $CacheObject->Autorun();
      
      // This should only fire when cache is loading automatically
      if (!func_num_args() && Gdn::PluginManager() instanceof Gdn_PluginManager)
         Gdn::PluginManager()->FireEvent('AfterActiveCache');
      
      return $CacheObject;
   }
1347085
public function refresh($forceForever = false, $resetClaims = false)
    {
        return $this->requireToken()->refresh($forceForever, $resetClaims);
    }
674733
protected function routeMiddleware($key, $middleware = null, $force = false)
    {
        if ($this->app->runningInConsole() && $force === false) {
            return $this->getRouter();
        }
        if (is_array($key)) {
            foreach ($key as $k => $m) {
                $this->routeMiddleware($k, $m);
            }

            return $this->getRouter();
        } else {
            $this->getRouter()->middleware($key, $middleware);
        }
    }
1256637
public function execute($request)
	{
		$url = $request->getUrl();
		$path = $url->getPath();

		$match = $this->_router->lookup($path);
		return $this->_controllerFor($match->getName())->execute(
			new RoutedRequest(
				$this->_filterChain->filter($request),
					$match, $this->_router));
	}
175424
public function create(
       string $action,
       string $prefix,
       string $controller,
       array $param,
       string $path): RouteInterface
   {
       try {
           return $this->factory->create(
               $action,
               $prefix,
               $controller,
               $param,
               $path);
       } catch (InvalidArgumentException $e) {
           throw $e;
       }
   }
149385
public function getToken($forceRefresh = false)
    {
        $cacheKey = [__CLASS__, 'appId' => Yii::$app->wechat->appId];
        if ($forceRefresh || ($accessToken = Yii::$app->wechat->cache->get($cacheKey)) === false) {
            $token = $this->getTokenFromServer();
            Yii::$app->wechat->cache->set($cacheKey, $token[$this->tokenJsonKey], $token['expires_in'] - 1500);
            return $token[$this->tokenJsonKey];
        }
        return $accessToken;
    }