Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jbboehr/handlebars.php

PHP handlebars compiler and VM
https://github.com/jbboehr/handlebars.php

handlebars handlebars-js php php-handlebars

Last synced: 19 days ago
JSON representation

PHP handlebars compiler and VM

Awesome Lists containing this project

README

        

# handlebars.php

[![Build Status](https://travis-ci.org/jbboehr/handlebars.php.svg?branch=master)](https://travis-ci.org/jbboehr/handlebars.php)
[![Coverage Status](https://coveralls.io/repos/jbboehr/handlebars.php/badge.svg?branch=master&service=github)](https://coveralls.io/github/jbboehr/handlebars.php?branch=master)
[![Latest Stable Version](https://poser.pugx.org/jbboehr/handlebars/v/stable.svg)](https://packagist.org/packages/jbboehr/handlebars)
[![License](https://poser.pugx.org/jbboehr/handlebars/license.svg)](https://packagist.org/packages/jbboehr/handlebars)

PHP handlebars.js Compiler and VM. Use with [handlebars.c](https://github.com/jbboehr/handlebars.c) and [php-handlebars](https://github.com/jbboehr/php-handlebars).

**Deprecated: Use [php-handlebars](https://github.com/jbboehr/php-handlebars) instead**

## Requirements

[php-handlebars](https://github.com/jbboehr/php-handlebars)

## Install

Via Composer

``` bash
composer require jbboehr/handlebars
```

## Usage

``` php
$handlebars = new Handlebars\Handlebars();

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

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

## Testing

``` bash
make test
```

## License

This project is licensed under the [LGPLv3](http://www.gnu.org/licenses/lgpl-3.0.txt).
handlebars.js is licensed under the [MIT license](http://opensource.org/licenses/MIT).