Callable - bobthecow/mustache.php GitHub Wiki
In Mustache.php, a variable is considered "callable" if the variable is:
- an anonymous function.
- an instance of a class which implements
__invoke
.
strict_callables
The Mustache Engine accepts a strict_callables
option, which defaults to true as of v3.0.0
. If set to false, Mustache will also following as "callable":
- an object and the name of a public function, e.g.
[$someObject, 'methodName']
. - a class name and the name of a public static function, e.g.
['SomeClass', 'methodName']
.
Disabling strict_callables
is not recommended.