Re-ordering mustache variable precedence
This commit is contained in:
committed by
Justin Hileman
parent
ec562fea09
commit
196f334621
+3
-3
@@ -605,10 +605,10 @@ class Mustache {
|
|||||||
protected function _findVariableInContext($tag_name, $context) {
|
protected function _findVariableInContext($tag_name, $context) {
|
||||||
foreach ($context as $view) {
|
foreach ($context as $view) {
|
||||||
if (is_object($view)) {
|
if (is_object($view)) {
|
||||||
if (isset($view->$tag_name)) {
|
if (method_exists($view, $tag_name)) {
|
||||||
return $view->$tag_name;
|
|
||||||
} else if (method_exists($view, $tag_name)) {
|
|
||||||
return $view->$tag_name();
|
return $view->$tag_name();
|
||||||
|
} else if (isset($view->$tag_name)) {
|
||||||
|
return $view->$tag_name;
|
||||||
}
|
}
|
||||||
} else if (isset($view[$tag_name])) {
|
} else if (isset($view[$tag_name])) {
|
||||||
return $view[$tag_name];
|
return $view[$tag_name];
|
||||||
|
|||||||
Reference in New Issue
Block a user