Skip to content

Commit 4a70fc1

Browse files
committed
Make use of Mustache-Autoloader and take the change from 'Mustache' to 'Mustache_Engine' into account.
1 parent 1bfcf0f commit 4a70fc1

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();
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)