$compiler
->write(" extends ".$compiler->getEnvironment()->getBaseTemplateClass()."\n", "{\n")
->indent()
- ->write("public function display(\$context)\n", "{\n")
+ ->write("public function display(array \$context)\n", "{\n")
->indent()
;
/**
* Renders the template with the given context and returns it as string.
+ *
+ * @param array $context An array of parameters to pass to the template
+ *
+ * @return string The rendered template
*/
- public function render($context)
+ public function render(array $context)
{
ob_start();
$this->display($context);
*/
interface Twig_TemplateInterface
{
- public function render($context);
+ /**
+ * Renders the template with the given context and returns it as string.
+ *
+ * @param array $context An array of parameters to pass to the template
+ *
+ * @return string The rendered template
+ */
+ public function render(array $context);
- public function display($context);
+ /**
+ * Displays the template with the given context.
+ *
+ * @param array $context An array of parameters to pass to the template
+ */
+ public function display(array $context);
+ /**
+ * Returns the bound environment for this template.
+ *
+ * @return Twig_Environment The current environment
+ */
public function getEnvironment();
}