PHPackages                             lune/template - 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. lune/template

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

lune/template
=============

PHP templates

v0.1.2(8y ago)070MITPHPPHP &gt;=7.0.0

Since Aug 18Pushed 8y ago1 watchersCompare

[ Source](https://github.com/lunephp/template)[ Packagist](https://packagist.org/packages/lune/template)[ RSS](/packages/lune-template/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (3)Dependencies (4)Versions (4)Used By (0)

Lune\\Template
==============

[](#lunetemplate)

PHP templates

Installation
------------

[](#installation)

Template is available on [Composer](http://getcomposer.org)

```
composer require lune/template

```

Usage
-----

[](#usage)

```
$templates = new \Lune\Template\Engine('path/to/templates');
$template = $templates->template('template.php');
$template->render();
```

### Passing variables

[](#passing-variables)

There are numerous ways to pass variables:

```
$templates = new \Lune\Template\Engine('path/to/templates', ['foo'=>'bar']);
$template = $templates->template('template.php', ['foo'=>'bar']);
$template->render(['foo'=>'bar']);
```

### Registering functions

[](#registering-functions)

```
$templates->registerFunction('error', function($message){
   return sprintf('%s', $message);
});
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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 ~302 days

Total

3

Last Release

2992d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b57a4311f92e06e73f6c646344a069d0088747f22e420a583f91bd3e6ab1729?d=identicon)[studiowbe](/maintainers/studiowbe)

---

Top Contributors

[![willemwollebrants](https://avatars.githubusercontent.com/u/916958?v=4)](https://github.com/willemwollebrants "willemwollebrants (7 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.0k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.2k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

291.8k](/packages/webkinder-sproutset)[awkwardideas/switchblade

Extended blade directives for laravel

102.1k](/packages/awkwardideas-switchblade)

PHPackages © 2026

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