Allow "empty" filesystem loader extension.

Fixes #123
This commit is contained in:
Justin Hileman
2012-11-28 12:59:06 -08:00
parent 1560863c49
commit 042d537992
+5 -1
View File
@@ -55,10 +55,14 @@ class Mustache_Loader_FilesystemLoader implements Mustache_Loader
throw new RuntimeException('FilesystemLoader baseDir must be a directory: '.$baseDir);
}
if (isset($options['extension'])) {
if (array_key_exists('extension', $options)) {
if (empty($options['extension'])) {
$this->extension = '';
} else {
$this->extension = '.' . ltrim($options['extension'], '.');
}
}
}
/**
* Load a Template by name.