@param bool $forceFetch

@return RouteInterface
@throws RouteEmptyValueException
@throws EntityFactoryConfigExceptionAlias
@deprecated
@see Route::fetchEntity()
@see Route::createEntity()
321246
public function makeInstance(bool $forceFetch = false): RouteInterface
    {
        if ($forceFetch || $this->getVerb() !== 'POST') {
            $this->fetchEntity(EntityFactoryConfig::create());
        } else {
            $this->createEntity(EntityFactoryConfig::create());
        }
        $this->instanceFromPk = true;
        $this->instanceForceFetch = $forceFetch;

        return $this;
    }
217390
public function getData($force = false)
    {
        if ($this->data === null || $force === true) {
            $route  = $this->getRoute();
            $action = $route->getAction();
            $method = false;

            $this->action($action);

            // Check for concrete method call
            if (method_exists($this, '__data'.ucfirst($action))) {
                // Concrete integration ...
                $method = '__data'.ucfirst($action);
            } elseif (method_exists($this, '__data')) {
                // custom generic overload solution
                $method = '__data';
            }

            // Call if method detected ...
            if ($method !== false) {
                $arguments = func_get_args();

                if (count($arguments) > 0) {
                    $result = call_user_func_array([$this, $method], $arguments);
                } else {
                    $result = call_user_func([$this, $method]);
                }

                if (true !== $result) {
                    throw new Doozr_Base_Model_Exception(
                        sprintf(
                            '%s() (if set) MUST return TRUE. %s() is set but it returned: "%s"',
                            $method,
                            $method,
                            var_export($result, true)
                        )
                    );
                }
            }
        }

        return $this->data;
    }
1177258
public function getCookie($forceRefresh = false)
    {
        $cacheKey = $this->cachePrefix . $this->stu_id;
        $cached = $this->getCache()->fetch($cacheKey);
        if ($forceRefresh || empty($cached)) {
            $jar = $this->login();
            //Cache the cookieJar 3000 s.
            $this->getCache()->save($cacheKey, serialize($jar), 3000);
            return $jar;
        }
        return unserialize($cached);
    }
454164
public function getToken($forceRefresh = false)
    {
        $cached = $this->getCache()->fetch($this->getCacheKey()) ?: $this->token;

        if ($forceRefresh || empty($cached)) {

            $result = $this->getTokenFromServer();

            $this->checkTokenResponse($result);

            $this->setToken(
                $token = $result[$this->tokenJsonKey],
                $this->expiresJsonKey ? $result[$this->expiresJsonKey] : null
            );

            return $token;
        }

        return $cached;
    }
462080
public function getSuggestForceHttps($defaultIfEmpty = false)
    {
        $isHttpsForced = $this->getValueByPathOrDefaultValue('plugin.tx_solr.suggest.forceHttps', $defaultIfEmpty);
        return $this->getBool($isHttpsForced);
    }
157410
public function getKeyAuthClient($forceNew = false)
    {
        if ( ! isset($this->instances[self::CLIENT_KEY]) || $forceNew) {
            $this->instances[self::CLIENT_KEY] = MeetupKeyAuthClient::factory($this->config);
        }

        return $this->instances[self::CLIENT_KEY];
    }
484761
protected final <REQ, RESP> Route get(RouteAction<Request<REQ>, Response<RESP>> action,
		RequestType<REQ> req, ResponseType<RESP> resp) {
		return createEntityRoute(HttpMethod.GET, "", action, req, resp);
	}
161085
private function matchRoute(ServerRequestInterface $request) : RouterMatch
    {
        $this->eventDispatcher->dispatch(new EventBeforeAppMatchingRoute($request));
        try {
            $routerMatch = $this->router->match($request);
        } catch (\Throwable $e) {
            $statusCode = 404;
            $message = "$statusCode: Router could not match request path {$request->getUri()->getPath()}";
            throw new HttpException($statusCode, $message, null, $e);
        }
        $this->eventDispatcher->dispatch(new EventAfterAppMatchingRoute($request, $routerMatch));
        return $routerMatch;
    }
342859
public function refresh($forceForever = false, $resetClaims = false)
    {
        if ($cache = $this->getCachedToken()) {
            return $cache;
        }

        // refresh token
        $token = $this->jwt->parser()->parseToken();
        $key = md5($token);
        $refreshToken = JWTAuth::refresh($token, $forceForever, $resetClaims);

        // cache newly refreshed token
        $this->setCachedToken($key, $refreshToken);

        return $this->cachedToken;
    }
1296094
public function getAllEndpoints($withHost = false, $forceReload = false)
    {
        $this->loadApiDefinition($forceReload);

        $host = empty($this->options['host']) ? '' : $this->options['host'];
        $prefix = self::PROXY_ROUTE;
        if (isset($this->options['prefix'])) {
            $prefix .= "/".$this->options['prefix'];
        }

        return !is_object($this->definition) ? [] : $this->definition->getEndpoints(
            $withHost,
            $prefix,
            $host,
            !empty($this->options['includeBasePath'])
        );
    }
1321703
private function doLoadResources(RouteLoaderInterface $loader, $forceValidate)
    {
        $collection = [];

        foreach ($this->resources->all() as $i => $resource) {
            // dont't add the prmary resource to
            $this->current = (string)$resource;

            if ($loaded = $loader->loadRoutes($resource)) {
                $collection[] = $loaded->all();
            }
        }

        $routes = call_user_func_array('array_merge', $collection);

        if ($this->isDebugging() || $forceValidate) {
            $this->writeManifests();
        }

        $this->current = null;
        $this->storage->write(new Routes($routes));
    }
452007
public function fetchControllerSuffix($method = 'GET', $customSuffix = [])
    {
        $method = strtoupper($method);

        // Validate that we have a map to handle the given HTTP method.
        if (!isset($this->suffixMap[$method])) {
            // throw new \RuntimeException(sprintf('Unable to support the HTTP method `%s`.', $method), 404);
        }

        if (isset($customSuffix['*'])) {
            return $customSuffix['*'];
        }

        $customSuffix = array_change_key_case($customSuffix, CASE_UPPER);

        // Split GET|POST|PUT format
        foreach ($customSuffix as $key => $value) {
            $keyArray = explode('|', $key);

            if (count($keyArray) <= 1) {
                continue;
            }

            foreach ($keyArray as $splitedMethod) {
                $customSuffix[$splitedMethod] = $value;
            }

            unset($customSuffix[$key]);
        }

        $suffix = array_merge($this->suffixMap, $customSuffix);

        if (!isset($suffix[$method])) {
            throw new RouteNotFoundException(sprintf('Unable to support the HTTP method `%s`.', $method), 404);
        }

        return trim($suffix[$method], '\\');
    }
776718
public function createMode($throwException = false, $forceMode = false)
    {
        if (false === $this->enabled && true !== $forceMode) {
            return new NullMode();
        }

        switch ($this->type) {
            case 'apache':
            case 'apache2':
                return new Apache($this->mapping);
            case 'nginx':
                return new Nginx($this->mapping);
            default:
                $this->logger->error('Invalid h264 pseudo streaming configuration.');
                if ($throwException) {
                    throw new InvalidArgumentException(sprintf('Invalid h264 pseudo streaming configuration width type "%s"', $this->type));
                }

                return new NullMode();
        }
    }
732249
private function loadApiDefinition($forceReload = false)
    {
        $definitionLoader = $this->getDefinitionLoader();

        $supported = $definitionLoader->supports($this->options['uri']);

        if ($forceReload || ($this->definition == null && $supported)) {
            $this->definition = $definitionLoader->load($this->options['uri']);
        } elseif (!$supported) {
            throw new \RuntimeException("This resource (".$this->options['uri'].") is not supported.");
        }
    }
625646
private function addJoin(ApiInterface $entity, $alias, $forceFind) {
        if(in_array($alias, $entity->getParentRelationships())) {
            $referencedModel = $entity->addJoin($this->getCriteriaHelper(), $alias);
            return new $referencedModel();
        } else {
            if($forceFind) {
                throw new Exception('Could Not Find Part in current entity: ' . $alias, 400);
            }
            return false;
        }
    }
580368
protected function createDispatcher()
    {
        $options = array();

        $options += [
               'routeParser' => 'FastRoute\\RouteParser\\Std',
               'dataGenerator' => 'FastRoute\\DataGenerator\\GroupCountBased',
              'dispatcher' => 'FastRoute\\Dispatcher\\GroupCountBased',
        ];

        $routeCollector = new RouteCollector(
            new $options['routeParser'](), new $options['dataGenerator']()
        );

        $routeCollector->setRequest($this->request);

        foreach ($this->routes as $route) {
            $routeCollector->addRoute($route->getMethod(), $route->getConvertedRoute(), $route->getRouteHandler());
        }

        return new $options['dispatcher']($routeCollector->getData());
    }
571983
public function signRequest(RequestInterface $request, $forceNew = false)
    {
        try {
            // force-get a new token if it was requested, if not, the regular
            // caching mechanism will be used so the call is not necessary here.
            if (true === $forceNew) {
                $this->pool->getToken($forceNew);
            }

            // create a new request with the new uri and the token added to the headers
            $uri = Uri::resolve(
                new Uri($this->pool->getEndpointUrl()),
                $request->getUri()
            );

            return $request
                ->withUri($uri)
                ->withHeader('X-Auth-Token', $this->pool->getTokenId())
            ;
        } catch (TokenException $e) {
            throw new ClientException('Could not obtain token', $request, null, $e);
        }
    }