All Projects → jbboehr → php-handlebars

jbboehr / php-handlebars

Licence: other
PHP bindings for handlebars.c

Programming Languages

c
50402 projects - #5 most used programming language
PHP
23972 projects - #3 most used programming language
M4
1887 projects

Projects that are alternatives of or similar to php-handlebars

Happy
Happy 🥳 | Rocketseat 💜 - NLW 03 👩‍🚀
Stars: ✭ 61 (+165.22%)
Mutual labels:  handlebars, handlebars-js
Publii
Publii is a desktop-based CMS for Windows, Mac and Linux that makes creating static websites fast and hassle-free, even for beginners.
Stars: ✭ 3,644 (+15743.48%)
Mutual labels:  handlebars, handlebars-js
handlebars.c
C implementation of handlebars.js
Stars: ✭ 31 (+34.78%)
Mutual labels:  handlebars, handlebars-js
pecl-teds
Tentative Extra Data Structures for php
Stars: ✭ 25 (+8.7%)
Mutual labels:  pecl
HandlebarsCookbook
A cookbook of handlebars and mustache, focus on handlebars.js , mustache.js and lightncandy usage
Stars: ✭ 20 (-13.04%)
Mutual labels:  handlebars
PHP-Printer
Print directly to a local printer from PHP
Stars: ✭ 46 (+100%)
Mutual labels:  pecl
pharext
Distribute your PHP extension as self-installing phar executable
Stars: ✭ 57 (+147.83%)
Mutual labels:  pecl
lnv-mobile-base
移动端开发脚手架-基于gulp的使用zepto、handlebars、sass并且带移动端适配方案(flexible.js)的前端工作流,旨在帮助移动端项目的开发
Stars: ✭ 41 (+78.26%)
Mutual labels:  handlebars
node-emails-from-csv
A simple NodeJS aplication that helps sending emails for events. Uses CSV files for target users.
Stars: ✭ 18 (-21.74%)
Mutual labels:  handlebars
to-htm
Conversion tool from JSX or Handlebars to htm (tagged template literal)
Stars: ✭ 35 (+52.17%)
Mutual labels:  handlebars
hyperstache
👨‍🦰 Handlebars just got a trim, alternative JS template engine, 2kb gzip
Stars: ✭ 36 (+56.52%)
Mutual labels:  handlebars
Cybros-Web-Application
Cybros Web Application Development
Stars: ✭ 29 (+26.09%)
Mutual labels:  handlebars
spring-mvc-ex
SpringMVC 게시판 구현 : 연습예제
Stars: ✭ 17 (-26.09%)
Mutual labels:  handlebars
dc-accelerators-content-rendering-service
An accelerated starting point for implementing Amplience Dynamic Content.
Stars: ✭ 15 (-34.78%)
Mutual labels:  handlebars
layouts
Wraps templates with layouts. Layouts can use other layouts and be nested to any depth. This can be used 100% standalone to wrap any kind of file with banners, headers or footer content. Use for markdown, HTML, handlebars views, lo-dash templates, etc. Layouts can also be vinyl files.
Stars: ✭ 28 (+21.74%)
Mutual labels:  handlebars
blog
用Node.js+Express和MongoDB搭建一个属于自己的博客
Stars: ✭ 46 (+100%)
Mutual labels:  handlebars
bro-start
🚗💨 Blazing fast webpack setup for static websites
Stars: ✭ 12 (-47.83%)
Mutual labels:  handlebars
nodejs-shopping-cart
NodeJS / Express / MongoDB - Shopping Cart (monolithic app with handlebars)
Stars: ✭ 42 (+82.61%)
Mutual labels:  handlebars
option chain analysis
NSE Nifty Option chain analysis on the web page.
Stars: ✭ 63 (+173.91%)
Mutual labels:  handlebars
homebrew-extensions
🍻 Homebrew tap for PHP extensions
Stars: ✭ 264 (+1047.83%)
Mutual labels:  pecl

php-handlebars

GitHub Linux Build Status GitHub OSX Build Status GitHub Docker Build Status Coverage Status License

PHP bindings for handlebars.c.

Installation

Nix / NixOS

nix-env -i -f https://github.com/jbboehr/php-handlebars/archive/v0.9.1.tar.gz

with a custom version of PHP:

nix-env -i -f https://github.com/jbboehr/php-handlebars/archive/v0.9.1.tar.gz \
    --arg php '(import <nixpkgs> {}).php73'

or, in a .nix file:

(import <nixpkgs> {}).callPackage (import (fetchTarball {
  url = https://github.com/jbboehr/php-handlebars/archive/v0.9.0.tar.gz;
  sha256 = "1dgq05b11hg6llfjl8zwxzvixf2g7vn4np4ihcl589jmxdal9np4";
})) {}

RPM repository

The extension is available in Remi's repository:

Fedora (change 24 to match your Fedora version)

dnf install https://rpms.remirepo.net/fedora/remi-release-24.rpm
dnf install --enablerepo=remi php-pecl-handlebars

RHEL/CentOS (for default PHP in base repository)

yum install https://rpms.remirepo.net/enterprise/remi-release-7.rpm
yum install php-pecl-handlebars

Source

Install handlebars.c

Linux / OSX

Prerequisite packages are:

  • PHP development headers and tools
  • gcc >= 4.4 | clang >= 3.x | vc >= 11
  • GNU make >= 3.81
  • automake
  • autoconf
  • handlebars.c and all of its dependencies (talloc, json-c, libyaml)
  • (optional) php-psr

You will need the PHP development headers. If PHP was manually installed, these should be available by default. Otherwise, you will need to fetch them from a repository.

git clone https://github.com/jbboehr/php-handlebars.git
cd php-handlebars
phpize
./configure
make
make test
sudo make install

If you have specific PHP versions running:

git clone https://github.com/jbboehr/php-handlebars.git
cd php-handlebars
/usr/local/bin/phpize
./configure --with-php-config=/usr/local/bin/php-config
make
make test
sudo make install

Add the extension to your php.ini:

echo extension=handlebars.so | tee -a /path/to/your/php.ini

Finally, restart the web server.

Usage

$vm = new Handlebars\VM();

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

echo $vm->renderFile('/path/to/foo.hbs', array('foo' => 'bar'));

See the examples folder for more examples.

License

This project is licensed under the Simplified BSD License (BSD-2-Clause).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].