Neos\Cache\Backend\SimpleFileBackend::requireOnce PHP Method

requireOnce() public method

Loads PHP code from the cache and include_onces it right away.
public requireOnce ( string $entryIdentifier ) : mixed
$entryIdentifier string An identifier which describes the cache entry to load
return mixed Potential return value from the include operation
    public function requireOnce($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;
        } else {
            return false;
        }
    }