ソースを参照

Use is_callable instead of method_exists

To use objects implementing __call().

Closes #18.
Neuman Vong 15 年 前
コミット
65770a03f6
1 ファイル変更1 行追加1 行削除
  1. 1 1
      Mustache.php

+ 1 - 1
Mustache.php

@@ -603,7 +603,7 @@ class Mustache {
 	protected function _findVariableInContext($tag_name, $context) {
 		foreach ($context as $view) {
 			if (is_object($view)) {
-				if (method_exists($view, $tag_name)) {
+				if (is_callable(array($view, $tag_name))) {
 					return $view->$tag_name();
 				} else if (isset($view->$tag_name)) {
 					return $view->$tag_name;