public function Twig_Environment::getCacheFilename

Gets the cache filename for a given template.

Parameters

string $name The template name:

Return value

string The cache file name

1 call to Twig_Environment::getCacheFilename()
Twig_Environment::loadTemplate in drupal/core/vendor/twig/twig/lib/Twig/Environment.php
Loads a template by name.

File

drupal/core/vendor/twig/twig/lib/Twig/Environment.php, line 244

Class

Twig_Environment
Stores the Twig configuration.

Code

public function getCacheFilename($name) {
  if (false === $this->cache) {
    return false;
  }
  $class = substr($this
    ->getTemplateClass($name), strlen($this->templateClassPrefix));
  return $this
    ->getCache() . '/' . substr($class, 0, 2) . '/' . substr($class, 2, 2) . '/' . substr($class, 4) . '.php';
}