projects
/
web/konrad/twig.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
214af8f
)
replaced the Twig_Environment::load() shortcut by a more useful render() one
author
Fabien Potencier
<fabien.potencier@gmail.com>
Sat, 26 Mar 2011 09:24:45 +0000 (10:24 +0100)
committer
Fabien Potencier
<fabien.potencier@gmail.com>
Sat, 26 Mar 2011 09:24:45 +0000 (10:24 +0100)
lib/Twig/Environment.php
patch
|
blob
|
history
diff --git
a/lib/Twig/Environment.php
b/lib/Twig/Environment.php
index
440a2f3
..
81262c8
100644
(file)
--- a/
lib/Twig/Environment.php
+++ b/
lib/Twig/Environment.php
@@
-269,9
+269,17
@@
class Twig_Environment
return $this->templateClassPrefix;
}
- public function load($name)
+ /**
+ * Renders a template.
+ *
+ * @param string $name The template name
+ * @param array $context An array of parameters to pass to the template
+ *
+ * @return string The rendered template
+ */
+ public function render($name, array $context = array())
{
- return $this->loadTemplate($name);
+ return $this->loadTemplate($name)->render($context);
}
/**