->write("{\n")
->indent()
;
-
- if (null !== $this->getNode('parent')) {
- $compiler->write("protected \$parent;\n\n");
- }
}
protected function compileConstructor(Twig_Compiler $compiler)
{
static protected $cache = array();
+ protected $parents;
protected $env;
protected $blocks;
return false;
} elseif ($parent instanceof Twig_Template) {
$name = $parent->getTemplateName();
- $this->parent[$name] = $parent;
+ $this->parents[$name] = $parent;
$parent = $name;
- } elseif (!isset($this->parent[$parent])) {
- $this->parent[$parent] = $this->env->loadTemplate($parent);
+ } elseif (!isset($this->parents[$parent])) {
+ $this->parents[$parent] = $this->env->loadTemplate($parent);
}
- return $this->parent[$parent];
+ return $this->parents[$parent];
}
abstract protected function doGetParent(array $context);
/* foo.twig */
class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
{
- protected \$parent;
-
protected function doGetParent(array \$context)
{
return "layout.twig";
/* foo.twig */
class __TwigTemplate_be925a7b06dda0dfdbd18a1509f7eb34 extends Twig_Template
{
- protected \$parent;
-
protected function doGetParent(array \$context)
{
return ((true) ? ("foo") : ("foo"));