Make LambdaHelper invokable.

Fixes #285
This commit is contained in:
Justin Hileman
2016-02-14 08:43:38 -08:00
parent 3c53736f09
commit 865de4114a
2 changed files with 27 additions and 0 deletions
+12
View File
@@ -50,6 +50,18 @@ class Mustache_LambdaHelper
->renderInternal($this->context);
}
/**
* Render a string as a Mustache template with the current rendering context.
*
* @param string $string
*
* @return string Rendered template
*/
public function __invoke($string)
{
return $this->render($string);
}
/**
* Get a Lambda Helper with custom delimiters.
*