PHPackages                             bjornbasar/karhu-view - 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. bjornbasar/karhu-view

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

bjornbasar/karhu-view
=====================

Template engine bridge for the karhu PHP microframework

v0.1.0(1mo ago)068↑473.5%MITPHPPHP &gt;=8.3

Since Apr 28Pushed 2w agoCompare

[ Source](https://github.com/bjornbasar/karhu-view)[ Packagist](https://packagist.org/packages/bjornbasar/karhu-view)[ RSS](/packages/bjornbasar-karhu-view/feed)WikiDiscussions main Synced 1w ago

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

karhu-view
==========

[](#karhu-view)

Template engine bridge for the [karhu](https://github.com/bjornbasar/karhu) PHP microframework.

Provides a `ViewInterface` so controllers can render templates without coupling to a specific engine. Ships with Twig and Plates adapters.

Install
-------

[](#install)

```
composer require bjornbasar/karhu-view

# Then install your preferred engine:
composer require twig/twig        # for Twig
# or
composer require league/plates    # for Plates
```

Usage
-----

[](#usage)

```
use Karhu\View\TwigAdapter;

$view = new TwigAdapter(__DIR__ . '/templates');
$html = $view->render('home.html.twig', ['name' => 'karhu']);

return (new Response())->withHeader('Content-Type', 'text/html')->withBody($html);
```

Custom engines
--------------

[](#custom-engines)

Implement `ViewInterface`:

```
use Karhu\View\ViewInterface;

final class BladeAdapter implements ViewInterface {
    public function render(string $template, array $data = []): string { /* ... */ }
}
```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance94

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

43d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a70a357358f560c83c7912fb2c07df4bbf799debcbfbfb0748dcf478d75311e?d=identicon)[bjornbasar](/maintainers/bjornbasar)

---

Top Contributors

[![bjornbasar](https://avatars.githubusercontent.com/u/362911?v=4)](https://github.com/bjornbasar "bjornbasar (2 commits)")

### Embed Badge

![Health badge](/badges/bjornbasar-karhu-view/health.svg)

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

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3861.2M](/packages/limenius-react-bundle)[wmde/php-vuejs-templating

PHP implementation of Vue.js templating engine

3041.6k2](/packages/wmde-php-vuejs-templating)[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)

PHPackages © 2026

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