jbboehr/handlebars

This package is abandoned and no longer maintained. The author suggests using the https://github.com/jbboehr/php-handlebars package instead.

PHP handlebars compiler and VM

v0.7.0 2016-04-14 04:16 UTC

README

Build Status Coverage Status Latest Stable Version License

PHP handlebars.js Compiler and VM. Use with handlebars.c and php-handlebars.

Deprecated: Use php-handlebars instead

Requirements

php-handlebars

Install

Via Composer

composer require jbboehr/handlebars

Usage

$handlebars = new Handlebars\Handlebars();

$fn = $handlebars->compile('{{foo}}');
echo $fn(array(
    'foo' => 'bar',
));

echo $handlebars->render('{{foo}}', array(
    'foo' => 'bar',
));

Testing

make test

License

This project is licensed under the LGPLv3. handlebars.js is licensed under the MIT license.