$this->blocks = array();
}
+ public function __clone()
+ {
+ foreach ($this->blocks as $name => $calls) {
+ foreach ($calls as $i => $call) {
+ $this->blocks[$name][$i][0] = $this;
+ }
+ }
+ }
+
public function getEnvironment()
{
return $this->env;
--- /dev/null
+--TEST--
+"extends" tag
+--TEMPLATE--
+{% extends "layout.twig" %}
+{% block inside %}INSIDE{% endblock inside %}
+--TEMPLATE(layout.twig)--
+{% extends "base.twig" %}
+{% block body %}
+ {% block inside '' %}
+{% endblock body %}
+--TEMPLATE(base.twig)--
+{% block body '' %}
+--DATA--
+return array()
+--EXPECT--
+INSIDE