...
|
...
|
@@ -532,7 +532,7 @@ class Environment
|
532
|
532
|
*
|
533
|
533
|
* @param string $template The template name
|
534
|
534
|
*
|
535
|
|
- * @return Template A template instance representing the given template name
|
|
535
|
+ * @return TemplateWrapper A template instance representing the given template name
|
536
|
536
|
*
|
537
|
537
|
* @throws LoaderError When the template cannot be found
|
538
|
538
|
* @throws SyntaxError When an error occurred during compilation
|
...
|
...
|
@@ -548,7 +548,7 @@ class Environment
|
548
|
548
|
|
549
|
549
|
$this->setLoader($loader);
|
550
|
550
|
try {
|
551
|
|
- $template = $this->loadTemplate($name);
|
|
551
|
+ $template = new TemplateWrapper($this, $this->loadTemplate($name));
|
552
|
552
|
} catch (\Exception $e) {
|
553
|
553
|
$this->setLoader($current);
|
554
|
554
|
|