PHPackages                             fignon/fignon-view-engine - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. fignon/fignon-view-engine

ActiveLibrary[HTTP &amp; Networking](/categories/http)

fignon/fignon-view-engine
=========================

The Fignon View Engine package is a simple abstract class you can extends to include easily any php template engine into Fignon.

0.0.1(2y ago)0275MITPHPPHP &gt;=8.0.0

Since Feb 16Pushed 2y agoCompare

[ Source](https://github.com/FignonPhp/fignon-view-engine)[ Packagist](https://packagist.org/packages/fignon/fignon-view-engine)[ Docs](https://github.com/FignonPhp/fignon-view-engineFignon)[ RSS](/packages/fignon-fignon-view-engine/feed)WikiDiscussions main Synced 1mo ago

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

Fignon View Engine
==================

[](#fignon-view-engine)

This is an interface to ease any php template engine integration to use within the Fignon Framework.

See some concrete implementation using

- [The Plates Engine](https://github.com/dahkenangnon/fignon-plate-engine)
- [The Symfony Twig Engine](https://github.com/dahkenangnon/fignon-twig-engine)
- [The Laravel Blade Engine](https://github.com/dahkenangnon/fignon-blade-engine)
- [The Smarty Engine](https://github.com/dahkenangnon/fignon-smarty-engine)

NB:

- You don't need this package, if you don't need to write an integration of a templates which don't be listed above.
- If you have just to use Twig or something listed above, just grab it with composer and start building using Fignon Framework.

If you really need it:

```
composer require dahkenangnon/fignon-view-engine
```

Then, use it like this:

```
namespace App\ViewsEngine; // This namespace is up to you

use Fignon\Extra\ViewEngine; // Use the Fignon View Engine integration interface

/**
 * View Engine,
 */
class MyViewEngine implements ViewEngine
{

    public function init(string $templatePath = null, string $templateCachedPath = null, array $options = []): ViewEngine {

        // Init you view engine and return $this;
    }

    public function render(string $viewPath = '', $locals = [], array $options = []): ?string
    {

        // Return the rendered string from your view engine
    }
}
```

You can then use your new view engine integration like this:

```
//app.php (or index.php) depending of how you call you entry point
declare(strict_types=1);

include_once __DIR__ . "/../vendor/autoload.php";

use Fignon\Tunnel;
use App\Features\Features;
use App\ViewsEngine\MyViewEngine;

$app = new Tunnel();
$app->set('env', 'development');
// ... other middlewares

// View engine initialization
$app->set('views', dirname(__DIR__) . '/templates');
$app->set('views cache', dirname(__DIR__) . '/var/cache');
$app->set('view engine options', []); // Add options to the view engine
$app->engine('my-view-engine-name', new MyViewEngine());

$app->set('case sensitive routing', true);
//  ... other middlewares

(new Features($app))->bootstrap();

$app->listen();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

814d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cc6c946e74297eef4d13c1e20cfd45c3c74c6db07f81a7b8a21fe9da3bf3e4df?d=identicon)[Dah-kenangnon Y. Justin](/maintainers/Dah-kenangnon%20Y.%20Justin)

---

Tags

httpresponserequestphpmiddlewareapirestwebsiteREST APIrestfulphp frameworkChainrunnerphp-middlewaretunnel

### Embed Badge

![Health badge](/badges/fignon-fignon-view-engine/health.svg)

```
[![Health](https://phpackages.com/badges/fignon-fignon-view-engine/health.svg)](https://phpackages.com/packages/fignon-fignon-view-engine)
```

###  Alternatives

[elementaryframework/water-pipe

URL routing framework and requests/responses handler for PHP

254.6k4](/packages/elementaryframework-water-pipe)

PHPackages © 2026

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