Callable - bobthecow/mustache.php GitHub Wiki
In Mustache.php, a variable is considered "callable" if the variable is:
- an anonymous function.
- an object and the name of a public function, e.g.
array($someObject, 'methodName')
. - a class name and the name of a public static function, e.g.
array('SomeClass', 'methodName')
. - an instance of a class which implements
__invoke
(PHP 5.4+).
strict_callables
As of v2.2.0
, the Mustache Engine accepts a strict_callables
option, which defaults to false. If set, Mustache will only consider the following as "callable":
- an anonymous function.
- an instance of a class which implements
__invoke
(PHP 5.4+).
Enabling strict_callables
is recommended for anyone using PHP 5.3 or better.