lib/Twig/lib/Twig/Environment.php
public function getTemplateClass($name, $index = null)
    {
        $key = $this->getLoader()->getCacheKey($name).$this->optionsHash;

        return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
    }
public function getTemplateClass($name, $index = null)
    {
        $key = $this->getLoader()->getCacheKey($name).$this->optionsHash;

        return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '_'.$index);
    }
Gets the template class associated with the given string.

The generated template class is based on the following parameters:

* The cache key for the given template;
* The currently enabled extensions;
* Whether the Twig C extension is available or not;
* PHP version;
* Twig version;
* Options with what environment was created.

@param string   $name  The name for which to calculate the template class name
@param int|null $index The index if it is an embedded template

@return string The template class name