public function getTemplateClass($name)
{
- return $this->getEnvironment()->getLoader()->getTemplateClass($name);
+ return $this->getEnvironment()->getTemplateClass($name);
}
}
$this->trimBlocks = (bool) $bool;
}
+ /**
+ * Gets the template class associated with the given string.
+ *
+ * @param string $name The name for which to calculate the template class name
+ *
+ * @return string The template class name
+ */
+ public function getTemplateClass($name)
+ {
+ return '__TwigTemplate_'.md5($name);
+ }
+
public function loadTemplate($name)
{
if (!$this->runtimeInitialized)
*/
public function load($name)
{
- $cls = $this->getTemplateClass($name);
+ $cls = $this->env->getTemplateClass($name);
if (class_exists($cls, false))
{
$this->env = $env;
}
- /**
- * Gets the template class associated with the given string.
- *
- * @param string $name The name for which to calculate the template class name
- *
- * @return string The template class name
- */
- public function getTemplateClass($name)
- {
- return '__TwigTemplate_'.md5($name);
- }
-
public function getCacheFilename($name)
{
return $this->cache.'/twig_'.md5($name).'.php';
* @param Twig_Environment $env A Twig_Environment instance
*/
public function setEnvironment(Twig_Environment $env);
-
- /**
- * Gets the template class associated with the given string.
- *
- * @param string $name The name for which to calculate the template class name
- *
- * @return string The template class name
- */
- public function getTemplateClass($name);
}