PHP code example of justblackbird / handlebars.php-helpers

1. Go to this page and download the library: Download justblackbird/handlebars.php-helpers 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/ */

    

justblackbird / handlebars.php-helpers example snippets


$helpers = new \JustBlackBird\HandlebarsHelpers\Helpers();
$engine = new \Handlebars\Handlebars(array('helpers' => $helpers));

$helpers = new \JustBlackBird\HandlebarsHelpers\Date\Helpers();
$engine = new \Handlebars\Handlebars(array('helpers' => $helpers));

$engine = new \Handlebars\Handlebars();
$engine->getHelpers()->add(
    'ifEqual',
    new \JustBlackBird\HandlebarsHelpers\Comparison\IfEqualHelper()
);