Skip to content

Commit 69fb6b1

Browse files
committed
Merge pull request #40 from hanseartic/feature-mustache-v2-compatibility
Support mustache 2
2 parents 1bfcf0f + dfc10a5 commit 69fb6b1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Views/Mustache.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,10 @@ class Mustache extends \Slim\View
5858
*/
5959
public function render($template)
6060
{
61-
require_once self::$mustacheDirectory . '/Mustache.php';
62-
$m = new \Mustache();
61+
require_once self::$mustacheDirectory . '/Autoloader.php';
62+
\Mustache_Autoloader::register(dirname(self::$mustacheDirectory));
63+
$m = new \Mustache_Engine();
6364
$contents = file_get_contents($this->getTemplatesDirectory() . '/' . ltrim($template, '/'));
64-
6565
return $m->render($contents, $this->data);
6666
}
6767
}

0 commit comments

Comments
 (0)