目前,我将我的函数放在一个类中,并将此类的实例传递给模板,并将我所需的函数作为类方法调用.
{{ unneededclass.blah() }}
我需要像下面这样做
{{ blah() }}
可能吗?
php inheritance template-engine function twig
function ×1
inheritance ×1
php ×1
template-engine ×1
twig ×1