PHP code example of werdnum / simple-lightncandy
1. Go to this page and download the library: Download werdnum/simple-lightncandy library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
werdnum / simple-lightncandy example snippets
$templating = new SimpleLightNCandy( __DIR__ . "/templates" );
$templating->addHelper( 'foo', function() { return "foo"; } )
$templating->addBlockHelper( 'fooBlock', function() { return "fooblock"; } );
print $templating->renderTemplate( 'foo_template' );