PHPackages                             bandar/bandar - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bandar/bandar

ActiveLibrary[Templating &amp; Views](/categories/templating)

bandar/bandar
=============

Fully tested, super minimalistic PHP template engine for PHP 5.2, 5.3, 5.4, 5.5

3.0.0(11y ago)6557MITPHPPHP &gt;=5.2.0

Since Nov 10Pushed 11y ago1 watchersCompare

[ Source](https://github.com/yani-/bandar)[ Packagist](https://packagist.org/packages/bandar/bandar)[ Docs](http://github.com/yani-/bandar)[ RSS](/packages/bandar-bandar/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (7)Used By (0)

Bandar
======

[](#bandar)

[![Build Status](https://camo.githubusercontent.com/b7748f6ae87a6c86c84b736ed63bb0a52a8ee251aba53c5c1213c968e3f8c214/68747470733a2f2f7472617669732d63692e6f72672f79616e692d2f62616e6461722e706e673f6272616e63683d646576656c6f70)](https://travis-ci.org/yani-/bandar)[![Code Coverage](https://camo.githubusercontent.com/202ec560018d2ca06d6abc3f45787cde3a78c05eee98a951dee801675b7d7fc2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f79616e692d2f62616e6461722f6261646765732f636f7665726167652e706e673f733d63343036333663323435346332316230323833336238343531373766373237303861633636643830)](https://scrutinizer-ci.com/g/yani-/bandar/)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/89ac2d281a47e547cebab1d088c785fd0f933174daef96607a9199b04cbfecf8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f79616e692d2f62616e6461722f6261646765732f7175616c6974792d73636f72652e706e673f733d64616661316361363162623038376664306564393131623833373661303139323066653234373766)](https://scrutinizer-ci.com/g/yani-/bandar/)[![Bitdeli Badge](https://camo.githubusercontent.com/9633977b5116bb5da807f740f2964bd68eb4f901e85326aff0526fd63ea2d0e3/68747470733a2f2f64327765637a68766c38323376302e636c6f756466726f6e742e6e65742f79616e692d2f62616e6461722f7472656e642e706e67)](https://bitdeli.com/free "Bitdeli Badge")[![Latest Stable Version](https://camo.githubusercontent.com/d3baca101848e91c8020018fc380b067bd1f69d60dfb96b287b5f358206d8917/68747470733a2f2f706f7365722e707567782e6f72672f62616e6461722f62616e6461722f762f737461626c652e706e67)](https://packagist.org/packages/bandar/bandar)[![Total Downloads](https://camo.githubusercontent.com/7c7a274bd24fa43a9d29a936b45a22894813ac2e30e37ab40f70199d489902e0/68747470733a2f2f706f7365722e707567782e6f72672f62616e6461722f62616e6461722f646f776e6c6f6164732e706e67)](https://packagist.org/packages/bandar/bandar)

Fully tested minimalistic PHP template engine. Include the class, set your templates location and start rendering.

### Requirements

[](#requirements)

PHP v5.2 and up. Tested on PHP v5.2, v5.3, v5.4, v5.5

### Usage

[](#usage)

```
// example.php
require_once 'lib/Bandar.php';
define(
    'BANDAR_TEMPLATES_PATH',
    dirname(__FILE__) . DIRECTORY_SEPARATOR . 'views'
);
Bandar::render('users/list', array('users' => array('name' => 'John Smith')));
```

```
// views/users/list.php

```

Run it

```
php example.php
```

#### Page with sidebar

[](#page-with-sidebar)

```
// example-with-sidebar.php
require_once 'lib/Bandar.php';
define(
    'BANDAR_TEMPLATES_PATH',
    dirname(__FILE__) . DIRECTORY_SEPARATOR . 'views'
);
$sidebar = Bandar::getTemplateContent('common/sidebar');
Bandar::render(
    'users/list',
    array(
        'users'   => array(array('name' => 'John Smith')),
        'sidebar' => $sidebar
    )
);
```

```
// views/users/list.php

```

```
// views/common/sidebar.php
Sidebar content
```

Run it

```
php example-with-sidebar.php
```

### Tests

[](#tests)

Coverage reports are stored inside the coverage folder. The goal is to always have 100% coverage.

```
phpunit
```

### Documentation

[](#documentation)

```
phpdoc -f lib/Bandar.php
```

### Contributing

[](#contributing)

For code guidelines refer to `.editorconfig`. This project is following PEAR code standard - The project is following Vincent Driessen's branching model aka git flow - Make sure to submit your pull requests against the **develop** branch

### License

[](#license)

MIT

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~71 days

Total

5

Last Release

4282d ago

Major Versions

1.0.1 → 2.0.02013-11-14

2.1.0 → 3.0.02014-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/656bc955ff095f76699b2144615fdf0282b990f3033d2275b8a27713eece6fff?d=identicon)[yani-](/maintainers/yani-)

---

Top Contributors

[![yani-](https://avatars.githubusercontent.com/u/1627243?v=4)](https://github.com/yani- "yani- (3 commits)")

---

Tags

templatetemplate engineengine

### Embed Badge

![Health badge](/badges/bandar-bandar/health.svg)

```
[![Health](https://phpackages.com/badges/bandar-bandar/health.svg)](https://phpackages.com/packages/bandar-bandar)
```

###  Alternatives

[latte/latte

☕ Latte: the intuitive and fast template engine for those who want the most secure PHP sites. Introduces context-sensitive escaping.

1.3k15.7M683](/packages/latte-latte)[anourvalar/office

Generate documents from existing Excel &amp; Word templates | Export tables to Excel (Grids)

24085.2k](/packages/anourvalar-office)[templavoilaplus/templavoilaplus

Building kit for custom pages and content elements with individual fields, containers and backend layouts. Supporting drag'n'drop and multiple references.

2637.6k13](/packages/templavoilaplus-templavoilaplus)[talesoft/tale-pug

A clean, lightweight and easy-to-use templating engine for PHP based on Pug, formerly Jade

319.4k3](/packages/talesoft-tale-pug)[leitsch/kirby-blade

Enable Laravel Blade Template Engine for Kirby 4 and Kirby 5

219.2k](/packages/leitsch-kirby-blade)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
