Neos\FluidAdaptor\View\TemplatePaths::createIdentifierForFile PHP Method

createIdentifierForFile() protected method

Returns a unique identifier for the given file in the format ____ The SH1 hash is a checksum that is based on the file path and last modification date
protected createIdentifierForFile ( string $pathAndFilename, string $prefix ) : string
$pathAndFilename string
$prefix string
return string
    protected function createIdentifierForFile($pathAndFilename, $prefix)
    {
        $templateModifiedTimestamp = 0;
        $isStandardInput = $pathAndFilename === 'php://stdin';
        $isFile = is_file($pathAndFilename);
        if ($isStandardInput === false && $isFile === false) {
            throw new InvalidTemplateResourceException(sprintf('The fluid file "%s" was not found.', $pathAndFilename), 1475831187);
        }
        if ($isStandardInput === false) {
            $templateModifiedTimestamp = filemtime($pathAndFilename);
        }
        return sprintf('%s_%s', $prefix, sha1($pathAndFilename . '|' . $templateModifiedTimestamp));
    }