public function Twig_Loader_Array::getCacheKey in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Loader/Array.php \Twig_Loader_Array::getCacheKey()
Gets the cache key to use for the cache for a given template name.
Parameters
string $name The name of the template to load:
Return value
string The cache key
Throws
Twig_Error_Loader When $name is not found
Overrides Twig_LoaderInterface::getCacheKey
File
- vendor/
twig/ twig/ lib/ Twig/ Loader/ Array.php, line 73
Class
- Twig_Loader_Array
- Loads a template from an array.
Code
public function getCacheKey($name) {
$name = (string) $name;
if (!isset($this->templates[$name])) {
throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
}
return $this->templates[$name];
}