werdnum/simple-lightncandy

此包的最新版本(0.5.0)没有可用的许可信息。

轻量级且无废话的lightncandy模板

0.5.0 2015-04-29 09:26 UTC

This package is not auto-updated.

Last update: 2024-09-28 18:05:14 UTC


README

这是一个简单、无废话的类,允许您开始使用LightnCandy来满足您的模板需求。

使用示例

$templating = new SimpleLightNCandy( __DIR__ . "/templates" );
$templating->addHelper( 'foo', function() { return "foo"; } )
$templating->addBlockHelper( 'fooBlock', function() { return "fooblock"; } );

print $templating->renderTemplate( 'foo_template' );

如果您想进行任何复杂操作(例如,更改编译选项),则可以对其进行子类化。

它设计为使用Composer进行安装

composer require werdnum/simple-lightncandy:~0.1