alar / template
兼容 perl::template 的模板引擎
3.0
2017-05-23 21:47 UTC
Requires
- php: >=7.0
- monolog/monolog: >=1.11.0
- psr/http-message: >=1.0
- psr/log: >=1.0.2
Requires (Dev)
- phpunit/phpunit: >=4.0
Suggests
- monolog/monolog: Alar template debug can be used as monolog destination via a Alar/MonologHandler
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,