Skip to content

Commit

Permalink
Mustache template should use Mustache_Engine
Browse files Browse the repository at this point in the history
  • Loading branch information
tamagokun committed Aug 23, 2013
1 parent 7a59ff9 commit 741fc40
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Toby/Template/Mustache.php
Expand Up @@ -5,12 +5,12 @@ class Mustache extends \Toby\Template
{
public function render($locals,$yield)
{
if(!class_exists("\\Mustache")) throw new \Rackem\Exception("Required class 'Mustache' not found.");
if(!class_exists("\\Mustache_Engine")) throw new \Rackem\Exception("Required class 'Mustache_Engine' not found.");
$template = file_get_contents($this->file);
$engine = new \Mustache();
$engine = new \Mustache_Engine();
$locals["yield"] = $yield;
ob_start();
echo $engine->render($template,$locals);
return ob_get_clean();
}
}
}

0 comments on commit 741fc40

Please sign in to comment.