werdnum/simple-lightncandy

There is no license information available for the latest version (0.5.0) of this package.

No-nonsense templating with lightncandy

0.5.0 2015-04-29 09:26 UTC

This package is not auto-updated.

Last update: 2024-04-13 15:06:43 UTC


README

This is a simple, no-nonsense class that allows you to get started using LightnCandy for your templating needs.

Example use:

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

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

If you want to do anything fancy (for example, change the compile options), then you can subclass it.

It's designed to be installed using Composer:

composer require werdnum/simple-lightncandy:~0.1