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

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

enricodias/template
===================

A simple template class.

v0.1(6y ago)017MITPHPPHP &gt;=5.3.3

Since Oct 20Pushed 4y ago1 watchersCompare

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

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Template
========

[](#template)

A simple template class, originally created in 2006.

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

[](#installation)

Require this package with Composer in the root directory of your project.

```
composer require enricodias/template
```

Then you can import the class into your application:

```
use enricodias\Template;
```

Basic Usage
-----------

[](#basic-usage)

The class works by loading files in memory and replacing variables delimited by `{$` and `}`.

```
$Template = new Template('/path/to/file.tpl'); // Load file.tpl
$Template->replace('var', 'Random Value');     // replace "{$var}" with "Random Value"

echo $Template;
```

Documentation
-------------

[](#documentation)

A more detailed documentation specifying all features is available in the [Wiki](https://github.com/enricodias/Template/wiki "Wiki").

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

2392d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7d69ec6f15869c0c5c5f1faabf873e4b05b1082dce513f5342904faea25f2500?d=identicon)[enricodias](/maintainers/enricodias)

---

Top Contributors

[![enricodias](https://avatars.githubusercontent.com/u/32619307?v=4)](https://github.com/enricodias "enricodias (32 commits)")

---

Tags

template

### Embed Badge

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

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

###  Alternatives

[phpoffice/phpword

PHPWord - A pure PHP library for reading and writing word processing documents (OOXML, ODF, RTF, HTML, PDF)

7.5k34.7M182](/packages/phpoffice-phpword)[rize/uri-template

PHP URI Template (RFC 6570) supports both expansion &amp; extraction

420137.3M46](/packages/rize-uri-template)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)[larablocks/pigeon

A more flexible email message builder for Laravel 5 including chained methods, reusable message configurations, and message layout and template view management.

143.7k](/packages/larablocks-pigeon)

PHPackages © 2026

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