PHPackages                             atelierspierrot/templatengine - 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. atelierspierrot/templatengine

AbandonedArchivedLibrary-assets

atelierspierrot/templatengine
=============================

A PHP package to build HTML5 views (based on HTML5 Boilerplate layouts).

v1.0.7(11y ago)23541[1 issues](https://github.com/atelierspierrot/templatengine/issues)3GPL-3.0HTMLPHP &gt;=5.3.0

Since Oct 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/atelierspierrot/templatengine)[ Packagist](https://packagist.org/packages/atelierspierrot/templatengine)[ Docs](http://github.com/atelierspierrot/templatengine)[ RSS](/packages/atelierspierrot-templatengine/feed)WikiDiscussions dev Synced 1mo ago

READMEChangelogDependencies (6)Versions (13)Used By (3)

Template Engine
===============

[](#template-engine)

[![documentation](https://camo.githubusercontent.com/be7adb4ffdc11ba4b480fe936a1e0d23e2c6b3a70ffea72fa4004a30e74e1bae/687474703a2f2f696d672e6174656c696572732d70696572726f742d7374617469632e66722f726561642d7468652d646f632e737667)](http://docs.ateliers-pierrot.fr/templatengine/)

A PHP package to build HTML5 views (based on [HTML5 Boilerplate](http://html5boilerplate.com/)layouts and the [Composer Assets Plugin](https://github.com/atelierspierrot/assets-manager)).

What is this package ?
----------------------

[](#what-is-this-package-)

This package defines a simple Template Engine to manage PHP view files, some HTML files including PHP scripts to build views passing them parameters and objects and some tools to manage global layouts to embed these views. As it is based on the [Composer Assets Plugin](https://github.com/atelierspierrot/assets-manager), the Template Engine also facilitate assets files usage and URL.

**This package is not yet really documented. Please take a look at the code and the [PHP Documentation](http://docs.ateliers-pierrot.fr/templatengine/) for more information. A complete demonstration is available in the package itself (PHP server is required).**

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

[](#installation)

This package requires that you use [Composer](http://getcomposer.org/) to manage your dependencies.

To use the package, you need to add it to your requirements in your `composer.json` AND to call its `TemplateEngineInstaller::postAutoloadDump` for the `post-autoload-dump` Composer's event:

```
"require": {
    ...
    "atelierspierrot/templatengine": "1.*"
},
...
"scripts": {
    ...
    "post-autoload-dump": "Assets\\Composer\\TemplateEngineInstaller::postAutoloadDump"
}

```

The `Assets` and `TemplateEngine` namespaces will be automatically added to the project Composer autoloader.

Composer Extra settings
-----------------------

[](#composer-extra-settings)

Using the `Template Engine`, you can define some extra features in your package's `composer.json`to specify some paths and presets used by the engine.

### Example

[](#example)

Below is the example of the package default configuration values added to the default [Composer Assets Plugin](https://github.com/atelierspierrot/assets-manager) configuration values:

```
"extra": {
    "views": [ "www", "www/html5boilerplate" ],
    "views-functions": "src/TemplateEngine/views_functions.php",
    "cache-dir": "tmp",
    "cache-assets-dir": "tmp_assets",
    "layouts": "www/html5boilerplate"
}

```

### `views`: array|string

[](#views-arraystring)

This defines one or more relative paths from your package root directory where to find your view files. These directories must exist and defaults to `www/` (the default assets directory).

### `views-functions`: array|string

[](#views-functions-arraystring)

The view functions are loaded before any view rendering and may define some useful methods to use in your view files. See the [Views Functions](#views-functions) section below for more infos.

This entry defines one or more relative file paths from your package root directory where to find your view functions. These files must exist.

### `cache-dir`: string

[](#cache-dir-string)

This defines the relative path from your `assets` directory to generate temporary files. If it does not exist, the directory will be created. This setting defaults to `tmp/`.

### `cache-assets-dir`: string

[](#cache-assets-dir-string)

This defines the relative path from your `assets` directory to generate temporary assets files such as merged or minifies CSS or JS. If it does not exist, the directory will be created. This setting defaults to `tmp_assets/`.

### `layouts`: array|string

[](#layouts-arraystring)

This defines one or more relative paths from your package root directory where to find your layout files, the global templates to use as other partial views wrapper. These directories must exist.

Views functions
---------------

[](#views-functions)

Any package defining the extra `views-functions` setting can define a set of standalone methods to use in view files ; all functions files of the declared `views-functions` are loaded for all views, so all of these methods may be accessible in any view file.

Author &amp; License
--------------------

[](#author--license)

> Template Engine

>

> Copyright (c) 2013-2016 Pierre Cassat and contributors

> Licensed under the Apache 2 license.

>

> ---

> Les Ateliers Pierrot - Paris, France

>  -

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance10

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

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

Total

10

Last Release

4338d ago

Major Versions

v0.1.0 → v1.0.02013-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/bdcad88f9577d45da703864395c687480896a757e90978502b600d9dd588c247?d=identicon)[picas](/maintainers/picas)

---

Top Contributors

[![e-picas](https://avatars.githubusercontent.com/u/1021199?v=4)](https://github.com/e-picas "e-picas (153 commits)")

---

Tags

boilerplatetemplate engine

### Embed Badge

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

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

###  Alternatives

[klein/klein

A lightning fast router for PHP

2.7k1.1M30](/packages/klein-klein)[phptal/phptal

PHPTAL is a templating engine for PHP5 that implements Zope Page Templates syntax

179421.6k19](/packages/phptal-phptal)[foil/foil

PHP template engine for native PHP templates

170111.2k7](/packages/foil-foil)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

28618.2k3](/packages/sebastienheyd-boilerplate)[proai/laravel-handlebars

A Laravel wrapper for LightnCandy for using the Handlebars (and Mustache) template engine.

38204.7k](/packages/proai-laravel-handlebars)[specialtactics/l5-api

Dependencies for the Laravel API Boilerplate package

3672.8k2](/packages/specialtactics-l5-api)

PHPackages © 2026

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