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

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

srcoder/template-bridge
=======================

Template bridge between your legacy and other template engines

1.0.2(8y ago)133MITPHPPHP ~7.0

Since Aug 23Pushed 8y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (10)Used By (0)

Template bridge
===============

[](#template-bridge)

Template bridge between your legacy php code and newer template engines.

Dependencies
------------

[](#dependencies)

Requires minimum of PHP 7.0. Also uses `srcoder/normalize-strings` for string manipulation.

Engines
-------

[](#engines)

- Plain
- Twig
- Compatible

Basic usage
-----------

[](#basic-usage)

Use the manager to define your templates.

```
use \Srcoder\TemplateBridge\Manager;
use \Srcoder\TemplateBridge\Engine\Twig;
use \Srcoder\TemplateBridge\Engine\Plain;

// Initialize template bridge
$templateBridge = new Manager;
// or static
$templateBridge = Manager::instance();

// Add a engine
$templateBridge->add(
        'twig',         // Name
        new Twig(),     // Template engine
        300             // Prio, higher is more important
);

$templateBridge->add(
        'plain',        // Name
        new Plain(),    // Template engine
        600             // Prio, higher is more important
);

// Adding a file
$templateManager->addFile('file');
// Will search for file.twig and file

// Render template
echo $templateBridge->render();
```

Data
----

[](#data)

When rendering something you can add data to it.

```
use \Srcoder\TemplateBridge\Data;

echo $templateBridge->render(new Data(['key' => 'value']))
```

Fun part
--------

[](#fun-part)

### Twig engine

[](#twig-engine)

When a Twig file is found it will work exactly as you expect.

### Plain engine

[](#plain-engine)

Plain files will replace {{$variable}} from the Data object Plain engine can also be used for javascript and html

### Compatible engine

[](#compatible-engine)

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity64

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

Recently: every ~26 days

Total

9

Last Release

3124d ago

Major Versions

0.10.3 → 1.0.02017-12-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/1548630acefd0c1ac8002a37135d67741307f978296ac628422e3923b7a3766b?d=identicon)[JeroenBoersma](/maintainers/JeroenBoersma)

---

Top Contributors

[![JeroenBoersma](https://avatars.githubusercontent.com/u/1163348?v=4)](https://github.com/JeroenBoersma "JeroenBoersma (26 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.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.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

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

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

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

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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