according to phalcon docs,
$compiler->addFunction('widget', function ($resolvedArgs, $exprArgs) {
return 'MyLibrary\Widgets::get(' . $resolvedArgs . ')';
});
I have a class with some general functions located at app/lib/general.php
How should I register a random function withing that class in volt?
$compiler->addFunction(
'itemStatus',
function ($resolvedArgs, $exprArgs) {
return "\\lib\\general.php\\general::_GetStatus({$resolvedArgs})";
}
);
Please Step by Step.
Thanks