diff --git a/composer.json b/composer.json index d0514f3..04f3eba 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "mustache/mustache", + "name": "framework/mustache", "description": "A Mustache implementation in PHP.", "keywords": ["templating", "mustache"], "homepage": "https://github.com/bobthecow/mustache.php", diff --git a/src/Mustache/Context.php b/src/Mustache/Context.php index 69c02e0..315c5f4 100644 --- a/src/Mustache/Context.php +++ b/src/Mustache/Context.php @@ -215,10 +215,6 @@ class Mustache_Context if (!($frame instanceof Closure)) { // Note that is_callable() *will not work here* // See https://github.com/bobthecow/mustache.php/wiki/Magic-Methods - if (method_exists($frame, $id)) { - return $frame->$id(); - } - if (isset($frame->$id)) { return $frame->$id; } @@ -226,6 +222,11 @@ class Mustache_Context if ($frame instanceof ArrayAccess && isset($frame[$id])) { return $frame[$id]; } + + if (method_exists($frame, $id)) { + return $frame->$id(); + } + } break;