You are here

public function Twig_Environment::getTemplateClass in Translation template extractor 6.3

Same name and namespace in other branches
  1. 7.3 vendor/Twig/Environment.php \Twig_Environment::getTemplateClass()

Gets the template class associated with the given string.

Parameters

string $name The name for which to calculate the template class name:

int $index The index if it is an embedded template:

Return value

string The template class name

2 calls to Twig_Environment::getTemplateClass()
Twig_Environment::getCacheFilename in vendor/Twig/Environment.php
Gets the cache filename for a given template.
Twig_Environment::loadTemplate in vendor/Twig/Environment.php
Loads a template by name.

File

vendor/Twig/Environment.php, line 263

Class

Twig_Environment
Stores the Twig configuration.

Code

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