mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-28 08:05:03 +00:00
Merge branch '1.x' into 2.x
* 1.x: removed one usage of Template vs TemplateWrapper
This commit is contained in:
+2
-2
@@ -449,7 +449,7 @@ class Environment
|
||||
*
|
||||
* @param string $template The template name
|
||||
*
|
||||
* @return Template A template instance representing the given template name
|
||||
* @return TemplateWrapper A template instance representing the given template name
|
||||
*
|
||||
* @throws LoaderError When the template cannot be found
|
||||
* @throws SyntaxError When an error occurred during compilation
|
||||
@@ -465,7 +465,7 @@ class Environment
|
||||
|
||||
$this->setLoader($loader);
|
||||
try {
|
||||
return $this->loadTemplate($name);
|
||||
return new TemplateWrapper($this, $this->loadTemplate($name));
|
||||
} finally {
|
||||
$this->setLoader($current);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user