Determines whether the given $uri has a valid cache entry.

@param string $uri

@return bool is available and valid
509608
protected function hasValidCacheEntry($uri): bool
    {
        $entry = $this->cache->get($uri);

        return false !== $entry &&
            empty($entry['explanation']) &&
            $entry['expires'] >= (new DateTimeService())->getCurrentTime();
    }
252730
public boolean shouldNotCache(String requestUri) {
		String uri = requestUri.toLowerCase();
		return checkContains(uri, noCacheIdentifiers) || checkSuffixes(uri, noCacheSuffixes);
	}
1247015
public static function validateURI($uri) {
        if(!empty(trim($uri))){
            return filter_var(trim($uri), FILTER_VALIDATE_URL);
        }
        return false;
    }
338024
private function validateString(string $uri): void
    {
        if (!\is_string($uri)) {
            throw new InvalidArgumentException(sprintf('String required, %s given', \gettype($uri)));
        }
    }
731793
public static function isNetworkPath($uri): bool
    {
        $uri = self::filterUri($uri);
        $null = $uri instanceof Psr7UriInterface ? '' : null;

        return $null === $uri->getScheme() && $null !== $uri->getAuthority();
    }
720435
public function has(string $uri, string $query = ''): bool
    {

        return $this->redis->exists($this->buildCacheKey($uri, $query));
    }
726815
public function validateUris(array $uris)
    {
        $requiredParams = [
            'temporary_credentials_uri',
            'authorization_uri',
            'token_credentials_uri',
        ];

        foreach ($requiredParams as $param) {
            if (! isset($uris[$param])) {
                throw new InvalidArgumentException("Missing URI configuration: {$param}.");
            }
        }

        return true;
    }
1356525
public function setCurrentURI($uri) {
        if(is_string($uri) && !empty(trim($uri))){
            $this->currentURI = $uri;
            $this->currentArray = Levels::getCurrent($this->navigation, $this->currentURI);
        }
        else{
            throw new InvalidArgumentException(
                '$uri must be a valid string when seting the current URI'
            );
        }
        return $this;
    }
521968
public function analyseURI($uri)
    {
        $uriElements = '/' . implode('/', $this->getURIElements());
        if ($uri == $uriElements) {
            $uri = '';
        } elseif (strpos($uri, $uriElements) === 0) {
            $uri = mb_substr($uri, mb_strlen($uriElements));
        }

        return $uri;
    }
336913
public function match(string $uri): bool
    {
        if ($this->uri == $uri) {
            return true;
        }
        $pattern = '/^' . $this->regex . '$/';
        return !is_null($this->regex) && preg_match($pattern, $uri);
    }
397235
public function has($key)
    {
        /* If $key is not valid string throws InvalidArgumentException */
        if (!$this->isString($key)) {
            throw new InvalidArgumentException('Cache key must be not empty string');
        }

        if ($this->getRaw($key)) {
            return true;
        }

        return false;
    }
1054576
public function checkIfExists($resourceUri) {
        //Break up the uri on the slashes
        $nodes = preg_split('/(\\\|\\/)/', $resourceUri, -1, PREG_SPLIT_NO_EMPTY);

        //foreach node
        $ptr = &$this->config;
        foreach($nodes as $node) {
            if (!isset($ptr[$node])) {
                return false;
            }
        }

        return true;
    }
1217641
public function isStream($uri)
    {
        try {
            list ($scheme,) = $this->normalize($uri, true, true);
        } catch (\Exception $e) {
            return false;
        }

        return $this->schemeExists($scheme);
    }
891526
public static boolean validateResource(URI uri) {
        return uri != null && uri.getPort() != -1 && uri.getHost() != null;
    }
1213873
public function isSubdomainUriExists( $subdomainId, $uri, $excludeUriId = null )
    {
        return $this->isExists( empty( $excludeUriId ) ? array(
            'subdomainId'   => $subdomainId,
            'uri'           => $uri,
        ) : array(
            'subdomainId'   => $subdomainId,
            'uri'           => $uri,
            new Predicate\Operator(
                'id',
                Predicate\Operator::OP_NE,
                $excludeUriId
            ),
        ) );
    }
685098
protected function seePageIs($uri)
    {
        $this->assertPageLoaded($uri = $this->prepareUrlForRequest($uri));

        $this->assertEquals(
            $uri, $this->currentUri, "Did not land on expected page [{$uri}].\n"
        );

        return $this;
    }
1270813
public function isValid(string $uri = ''): bool
    {
        return !empty($this->value) && $this->isNotExpired() && $this->isThere($uri);
    }