Checks if a cache entry with the specified identifier exists.

@param string $entryIdentifier
@return boolean true if such an entry exists, false if not
@throws \InvalidArgumentException
@api
961076
public function has(string $entryIdentifier): bool
    {
        if ($this->frozen === true) {
            return isset($this->cacheEntryIdentifiers[$entryIdentifier]);
        }
        if ($entryIdentifier !== basename($entryIdentifier)) {
            throw new \InvalidArgumentException('The specified entry identifier must not contain a path segment.', 1282073034);
        }
        return !$this->isCacheFileExpired($this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension);
    }
533707
public function generate(string $entryIdentifier, string $fileName, string $data)
    {
        $contentGzip = \gzencode($data, $this->getCompressionLevel());
        if ($contentGzip) {
            GeneralUtility::writeFile($fileName . '.gz', $contentGzip);
        }
    }
218073
public function find($identifier)
    {
        $this->identifier = $identifier;
        try {
            $data = $this->getResponseData($this->client->send($this->prepare()));
        } catch (ClientException $e) {
            throw new InvalidArgumentException('Card not found with identifier: ' . $identifier);
        }
        return $this->transform($data);
    }
92470
public function getIdentifierNamespaces($identifier)
    {
        return isset($this->__identifiers[$identifier]) ?  $this->__identifiers[$identifier] : false;
    }
208337
public function requireOnce(string $entryIdentifier)
    {
        $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
        if ($entryIdentifier !== basename($entryIdentifier)) {
            throw new \InvalidArgumentException('The specified entry identifier (' . $entryIdentifier . ') must not contain a path segment.', 1282073036);
        }

        if (is_file($pathAndFilename)) {
            return include_once($pathAndFilename);
        }
        return false;
    }
1221787
public function generate(string $entryIdentifier, string $fileName, string $data)
    {
        if (!$this->checkAvailable()) {
            return;
        }
        $contentCompress = \brotli_compress($data);
        if ($contentCompress) {
            GeneralUtility::writeFile($fileName . '.br', $contentCompress);
        }
    }
633931
public function get(string $identifier): \Psr\Log\LoggerInterface
    {
        if (isset($this->instances[$identifier])) {
            return $this->instances[$identifier];
        }

        if (!isset($this->configuration[$identifier])) {
            throw new \InvalidArgumentException(sprintf('The given log identifier "%s" was not configured for the "%s" factory.', htmlspecialchars($identifier), self::class), 1515355505545);
        }

        if (!class_exists(Logger::class)) {
            throw new \Exception('To use the default logging you have to have the "neos/flow-log" package installed. It seems you miss it, so install it via "composer require neos/flow-log".', 1515437383589);
        }

        $backends = $this->instantiateBackends($this->configuration[$identifier]);

        $logger = new Logger($backends);
        $this->instances[$identifier] = $logger;
        return $logger;
    }
490639
protected function _locate(ObjectIdentifier $identifier, $fallback = true)
    {
        $class = $this->__registry->getClass($identifier);

        //If the class is FALSE we have tried to locate it already, do not locate it again.
        if(empty($class) && ($class !== false))
        {
            $class = $this->_locators[$identifier->getType()]->locate($identifier, $fallback);

            //If we are falling back set the class in the registry
            if($fallback)
            {
                if(!$this->__registry->get($identifier) instanceof ObjectInterface) {
                    $this->__registry->setClass($identifier, $class);
                }
            }
        }

        return $class;
    }
505951
public function setIdentifier($identifier)
    {
        if (is_string($identifier) === false || empty($identifier) === true) {
            throw new InvalidArgumentException(
                "The 'identifier' argument must be a non-empty string."
            );
        }
        
        $this->identifier = $identifier;
    }
545141
public function isValidEntryIdentifier($identifier)
    {
        if (false === GeneralUtility::isValidUrl($identifier)) {
            return false;
        }
        $urlParts = \parse_url($identifier);
        $required = ['host', 'path', 'scheme'];
        foreach ($required as $item) {
            if (!isset($urlParts[$item]) || \mb_strlen($urlParts[$item]) <= 0) {
                return false;
            }
        }

        return true;
    }
367872
public function getUser($userIdentifier)
    {
        if ($this->apiVersionIsGreaterThanV3() && !is_numeric($userIdentifier)) {
            throw new InvalidIdentifierException('user');
        }

        return $this->get(sprintf('users/%s', $userIdentifier));
    }
613666
protected function cacheRemoteUri(string $entryIdentifier, int $lifetime = 3600, array $tags = [])
    {
        $result = $this->cacheViaTrait($entryIdentifier, function () {
        }, 'remote_file', $lifetime, $tags);
        if (null === $result) {
            // call two times, because the anonym function is not the real result.
            // The result is output by the get method of the remote_file backend.
            $result = $this->cacheViaTrait($entryIdentifier, function () {
            }, 'remote_file', $lifetime, $tags);
        }

        return $result;
    }
769146
public function addIdentifier($identifier)
    {
        $this->validateIdentifier($identifier);

        if (in_array($identifier, $this->identifiers)) {
            throw new InvalidIdentifierException('Error: Cannot add the identifier "'.$identifier.'" twice');
        }

        $this->identifiers[] = $identifier;
    }
578750
public function has($identifier): bool
    {
        foreach ($this->queue as $item) {
            if ($item->getMessage()->getIdentifier() === $identifier) {
                return true;
            }
        }

        return false;
    }
1230685
public function hasIdentifier($identifier)
    {
        if(!$identifier instanceof KObjectIdentifierInterface) {
            $identifier = $this->getIdentifier($identifier);
        }

        return in_array((string) $identifier, $this->__identifier_list);
    }
310269
public function setSectionIdentifier($sectionIdentifier)
    {
        if (Format::isIdentifier($sectionIdentifier) || empty($sectionIdentifier)) {
            $this->sectionIdentifier = $sectionIdentifier;
        } else {
            $msg = "'${sectionIndentifier}' is not a valid QTI Identifier.";
            throw new InvalidArgumentException($msg);
        }
    }
18272
public function has(string $entryIdentifier): bool
    {
        $success = false;
        apcu_fetch($this->identifierPrefix . 'entry_' . $entryIdentifier, $success);
        return $success;
    }