public function Twig_Environment::getCacheFilename in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/Environment.php \Twig_Environment::getCacheFilename()
Gets the cache filename for a given template.
Parameters
string $name The template name:
Return value
string|false The cache file name or false when caching is disabled
1 call to Twig_Environment::getCacheFilename()
- Twig_Environment::loadTemplate in vendor/
Twig/ Environment.php - Loads a template by name.
File
- vendor/
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';
}