alar/template

兼容 perl::template 的模板引擎

3.0 2017-05-23 21:47 UTC

This package is auto-updated.

Last update: 2024-09-12 19:12:11 UTC


README

alar/template 模板引擎

这个仓库是用来做什么的?

  • alar/template 是一个兼容 PERL::HtmlTemplate 的模板引擎

这个项目主要是内部使用,所以文档还不完整,但代码应该不难检查。

我该如何设置环境?

  • 设置总结

    composer require alar/template

  • 使用方法

use alar\template\template;
$template=new template($options);
where $options is a hash with this possible keys
	'paths'=>string or array path to search when template name is relative
	'debug'=> boolean debug on/off
	'debuglevel'=> PSR-3 log level
	'novars' => boolean when true, variables name are printed instead of values
	'nodict' => boolean, same as novars but for Dictionary variables,
	'callback'=>dictionaryInterface an object to be used or dictionary access
	'filename'=>string templatename,
	'cachedir'=>string cacheDirectory,
	'tmplroot'=string >base template dir,