A clean PHP template engine. 📦
PHP HTML
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

endobox

Build Status Code Climate

Highlights

Installation

Using composer:

composer require younishd/endobox

Getting started

$factory = endobox\Endobox::create('path/to/templates');

$box = $factory('hello'); // omit extension

echo $box->render([ 'subject' => 'world' ]); // assign data directly via render

The template hello.php could look like this:

<h1>Hello <?= $subject ?></h1>

Note that <?= is syntactic sugar for <?php echo.

The output would be:

<h1>Hello world</h1>

This example can be found in demo/.

Documentation

Check out the wiki.

License

endobox is open-sourced software licensed under the MIT license.