tpl: added support for pure php templates