Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
silentworks committed Dec 8, 2013
2 parents d70bda9 + 5b8872f commit 9270489
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions Smarty.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ class Smarty extends \Slim\View
* This method will output the rendered template content
*
* @param string $template The path to the template, relative to the templates directory.
* @param null $data
* @return void
*/
public function render($template)
public function render($template, $data = null)
{
$parser = $this->getInstance();
$parser->assign($this->all());

return $parser->fetch($template);
return $parser->fetch($template, $data);
}

/**
Expand Down
5 changes: 3 additions & 2 deletions Twig.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,15 @@ class Twig extends \Slim\View
* This method will output the rendered template content
*
* @param string $template The path to the Twig template, relative to the Twig templates directory.
* @param null $data
* @return void
*/
public function render($template)
public function render($template, $data = null)
{
$env = $this->getInstance();
$parser = $env->loadTemplate($template);

return $parser->render($this->all());
return $parser->render($this->all(), $data);
}

/**
Expand Down

0 comments on commit 9270489

Please sign in to comment.