Returns the code wrapped in php tags as written to the cache, ready to be included.

@param string $entryIdentifier
@return string
@throws \InvalidArgumentException
542863
public function getWrapped(string $entryIdentifier): string
    {
        if (!$this->isValidEntryIdentifier($entryIdentifier)) {
            throw new \InvalidArgumentException('"' . $entryIdentifier . '" is not a valid cache entry identifier.', 1233057752);
        }

        return $this->backend->get($entryIdentifier);
    }
18272
public function has(string $entryIdentifier): bool
    {
        $success = false;
        apcu_fetch($this->identifierPrefix . 'entry_' . $entryIdentifier, $success);
        return $success;
    }
1171283
public static function quoteIdentifier($identifier, $tableName = null)
    {
        if ($identifier === null || $identifier === '') {
            return '';
        }

        if (!is_string($identifier)) {
            throw new InvalidArgumentException(sprintf(
                'Field Name must be a string, received %s',
                is_object($identifier) ? get_class($identifier) : gettype($identifier)
            ));
        }

        if ($tableName !== null) {
            if (!is_string($tableName)) {
                throw new InvalidArgumentException(sprintf(
                    'Table Name must be a string, received %s',
                    is_object($tableName) ? get_class($tableName) : gettype($tableName)
                ));
            }

            if ($tableName === '') {
                throw new InvalidArgumentException(
                    'Table Name can not be empty.'
                );
            }

            if ($identifier === '*') {
                $template = '%1$s.*';
            } else {
                $template = '%1$s.`%2$s`';
            }

            return sprintf($template, $tableName, $identifier);
        }

        if ($identifier === '*') {
            return $identifier;
        } else {
            return sprintf('`%1$s`', $identifier);
        }
    }
453448
public function getIdByIso($isoCode) {
		$match = ['DE' => 1, 'AT' => 2, 'CH' => 3];

		$isoCode = strtoupper($isoCode);
		if (array_key_exists($isoCode, $match)) {
			return $match[$isoCode];
		}

		throw new InvalidArgumentException('ISO code not valid: ' . $isoCode);
	}
854795
protected function extractMetadata($entryIdentifier, $content)
    {
        $separatorIndex = strpos($content, self::SEPARATOR);
        if ($separatorIndex === false) {
            $exception = new InvalidDataTypeException('Could not find cache metadata in entry with identifier ' . $entryIdentifier, 1433155925);
            if ($this->environment->getContext()->isProduction()) {
                $this->logger->logException($exception);
            } else {
                throw $exception;
            }
        }

        $metadataJson = substr($content, 0, $separatorIndex);
        $metadata = json_decode($metadataJson, true);
        if ($metadata === null) {
            $exception = new InvalidDataTypeException('Invalid cache metadata in entry with identifier ' . $entryIdentifier, 1433155926);
            if ($this->environment->getContext()->isProduction()) {
                $this->logger->logException($exception);
            } else {
                throw $exception;
            }
        }

        $this->metadata[$entryIdentifier] = $metadata;

        return substr($content, $separatorIndex + 1);
    }
555468
public function get(string $entryIdentifier)
    {
        return $this->uncompress($this->redis->get($this->buildKey('entry:' . $entryIdentifier)));
    }
485231
public function getByIdentifier(Identifier $identifier)
    {
        $className = $identifier->class->getName();
        $mapId     = $identifier->getSerialized();

        return $this->identityMap[$className][$mapId];
    }
965124
public function getClassTemplates(ObjectIdentifier $identifier)
    {
        $templates = array();

        //Identifier
        $component = $this->getObject('object.bootstrapper')
            ->getComponentIdentifier($identifier->package, $identifier->domain);

        //Fallback
        if($namespaces = $this->getIdentifierNamespaces($component))
        {
            foreach($namespaces as $namespace)
            {
                //Handle class prefix vs class namespace
                if(strpos($namespace, '\\')) {
                    $namespace .= '\\';
                }

                $templates[] = $namespace.'<Class>';
                $templates[] = $namespace.'<Package><Path><File>';
            }
        }

        $templates = array_merge($templates, parent::getClassTemplates($identifier));

        return $templates;
    }
1294956
public function findByIdentifier( $identifier )
    {

        $identifier = explode('.', $identifier);

        if( count( $identifier) < 2 ) {
            throw new \InvalidArgumentException("yeah, not a table.column level identifier");
        }

        $columnName = array_pop( $identifier );
        $tableName = implode('.',$identifier );

        $table = new Query( <<<SQL
SELECT
    a.attrelid::text || '.' || a.attnum AS key
FROM
    pg_attribute AS a
WHERE
    a.attrelid = quote_ident(%tableName:%)::regclass::oid AND
    attname = %columnName:% AND
    a.attnum > 0
SQL
,
            array(
                'tableName' => $tableName,
                'columnName' => $columnName,
            )
        );

        try {
            $columnKey = $this->db->query( $table )->fetch( Result::FETCH_SINGLE );
        } catch( \Exception $e ) {
            return null;
        }

        return $this->find( $columnKey );

    }
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;
    }
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;
    }
151067
public function getIdentifiedElement($identifier, $elementClasses = array()){
        $returnValue = null;

        if(!is_array($elementClasses)){
            throw new InvalidArgumentException('elementClasses must be an array');
        }

        $relatedItem = $this->getRelatedItem();

        if(!is_null($relatedItem)){
            $identifiedElementsCollection = $relatedItem->getIdentifiedElements();

            if(empty($elementClasses)){
                $returnValue = $identifiedElementsCollection->getUnique($identifier);
            }else{
                foreach($elementClasses as $elementClass){
                    $returnValue = $identifiedElementsCollection->getUnique($identifier, $elementClass);
                    if(!is_null($returnValue)){
                        break;
                    }
                }
            }
        }

        return $returnValue;
    }
1048800
private function Identifier()
    {
        // check if we have an annotation
        if ( ! $this->lexer->isNextTokenAny(self::$classIdentifiers)) {
            $this->syntaxError('namespace separator or identifier');
        }

        $this->lexer->moveNext();

        $className = $this->lexer->token['value'];

        while ($this->lexer->lookahead['position'] === ($this->lexer->token['position'] + strlen($this->lexer->token['value']))
                && $this->lexer->isNextToken(DocLexer::T_NAMESPACE_SEPARATOR)) {

            $this->match(DocLexer::T_NAMESPACE_SEPARATOR);
            $this->matchAny(self::$classIdentifiers);

            $className .= '\\' . $this->lexer->token['value'];
        }

        return $className;
    }
977297
protected function getCacheFilename(string $entryIdentifier): string
    {
        $urlParts = \parse_url($entryIdentifier);
        $parts = [
            $urlParts['scheme'],
            $urlParts['host'],
            isset($urlParts['port']) ? (int)$urlParts['port'] : ('https' === $urlParts['scheme'] ? 443 : 80),
        ];

        $path = \implode('/', $parts) . '/' . \trim($urlParts['path'], '/');
        $cacheFilename = GeneralUtility::getFileAbsFileName(self::CACHE_DIRECTORY . $path);
        $fileExtension = (string)PathUtility::pathinfo(PathUtility::basename($cacheFilename), PATHINFO_EXTENSION);
        if (empty($fileExtension) || !GeneralUtility::inList($this->configuration->get('fileTypes'), $fileExtension)) {
            $cacheFilename = \rtrim($cacheFilename, '/') . '/index.html';
        }

        return $cacheFilename;
    }
823397
public function getVenue(Identifier $identifier)
    {
        $url = $this->getUrl(sprintf('venues/%s', urlencode($identifier)));

        $response = $this->httpClient->get($url, $this->getDefaultHeaders());

        $content = $this->parseResponse($response);

        if (!isset($content->response->venue)) {
            throw InvalidResponseException::invalidResponseBody($response, 'response.venue');
        }

        return $this->venueFactory->create(new Description($content->response->venue));
    }
720454
protected function findCacheFilesByIdentifier(string $entryIdentifier)
    {
        $pathAndFilename = $this->cacheDirectory . $entryIdentifier . $this->cacheEntryFileExtension;
        return (file_exists($pathAndFilename) ? [$pathAndFilename] : false);
    }
876824
public function get(string $entryIdentifier)
    {
        $value = $this->memcache->get($this->identifierPrefix . $entryIdentifier);
        if (substr($value, 0, 13) === 'Flow*chunked:') {
            list(, $chunkCount) = explode(':', $value);
            $value = '';
            for ($chunkNumber = 1; $chunkNumber < $chunkCount; $chunkNumber++) {
                $value .= $this->memcache->get($this->identifierPrefix . $entryIdentifier . '_chunk_' . $chunkNumber);
            }
        }
        return $value;
    }