Add a 'MustacheLoader' filesystem loader.

This commit is contained in:
Justin Hileman
2011-09-21 23:40:12 -07:00
parent a828af2869
commit 2aaa820965
4 changed files with 91 additions and 1 deletions
+4 -1
View File
@@ -819,7 +819,10 @@ class Mustache {
* @return string
*/
protected function _getPartial($tag_name) {
if (is_array($this->_partials) && isset($this->_partials[$tag_name])) {
if (
(is_array($this->_partials) || $this->_partials instanceof ArrayAccess)
&& isset($this->_partials[$tag_name])
) {
return $this->_partials[$tag_name];
}