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

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

infrajs/template
================

v1.1.40(4y ago)03.2k[2 issues](https://github.com/infrajs/template/issues)20PHP

Since Mar 2Pushed 4y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (1)Versions (42)Used By (20)

Шаблонизатор Template
=====================

[](#шаблонизатор-template)

Установка через composer
------------------------

[](#установка-через-composer)

```
{
	"require":{
		"infrajs/template":"~1"
	}
}
```

Использование
-------------

[](#использование)

**Файл с шаблоном**

```
Привет {name}!
```

**Данные**

```
$data = array(
	"name"=>"Алибаба"
);
```

**Объединяем**

```
use infrajs\template\Template;
require_once('vendor/autoload.php');
$src = 'Путь/до/шаблона';
$html = Template::parse($src, $data);
echo $html; //Привет Алибаба!
```

**Предопределённые фнкции в шаблоне**

- `{~random(:str1,:str2,:str3)}` Случайным образом выводит одну из строк. Количество аргументов не ограничено
- `{~path(src)}` Передаётся либо относительный путь от корня либо абсолютный путь. Выводится путь со слэшем в начале.

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor1

Top contributor holds 98.9% 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 ~53 days

Total

41

Last Release

1612d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/341a8ef8a06866ad99b1bbcf0216fd8e331b076b1690a7d992c386192674b787?d=identicon)[akiyatkin](/maintainers/akiyatkin)

---

Top Contributors

[![akiyatkin](https://avatars.githubusercontent.com/u/953753?v=4)](https://github.com/akiyatkin "akiyatkin (90 commits)")[![ange187](https://avatars.githubusercontent.com/u/13964595?v=4)](https://github.com/ange187 "ange187 (1 commits)")

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/infrajs-template/health.svg)](https://phpackages.com/packages/infrajs-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)
