function display(Jig $jig) { $functionHelper = new FunctionHelper(); $closureFunction = function () { $args = func_get_args(); echo "This is a closure function. The args were: " . var_export($args); }; $functionHelper->bindFunction('closureFunction', $closureFunction); $functionHelper->bindFunction('globalFunction', 'JigDemo\\Controller\\globalFunction'); $functionHelper->bindFunction('classFunction', [$this, 'classFunction']); $jig->addDefaultHelper(get_class($functionHelper)); return getTemplateCallable('functionExample', [$functionHelper]); }
function display() { // $helper = new BasicTemplateHelper(); // return getTemplateCallable('SyntaxExample'); }
function display() { return getTemplateCallable('index'); }